PHP Interface FOF30\View\DataView\DataViewInterface

Mostra file Open project: akeeba/fof

Public Methods

Method Description
addCssFile ( string $uri, string $version = null, string $type = 'text/css', string $media = null, array $attribs = [] ) Add a CSS file to the page generated by the CMS
addCssInline ( string $css, string $type = 'text/css' ) Adds an inline stylesheet (inline CSS) to the page header
addJavascriptFile ( string $uri, string $version = null, string $type = 'text/javascript', boolean $defer = false, boolean $async = false ) Add a JS script file to the page generated by the CMS.
addJavascriptInline ( string $script, string $type = 'text/javascript' ) Adds an inline JavaScript script to the page header
addLess ( string $uri, string $cssUri, string $version = null, string $type = 'text/css', string $media = null, array $attribs = [] ) Compile a LESS file into CSS and add it to the page generated by the CMS.
escape ( mixed $var ) : string Escapes a value for output in a view script.
getContainer ( ) : Container Returns a reference to the container attached to this View
getLayout ( ) : string Get the layout.
getLists ( ) : stdClass Returns the internal list of useful variables to the benefit of header fields.
getName ( ) : string Method to get the view name
getPagination ( ) : JPagination Returns a reference to the pagination object of this view
getPerms ( ) : stdClass Returns a reference to the permissions object of this view
getTask ( ) : string Returns the task being rendered by the view
hasAjaxOrderingSupport ( ) : boolean | array Determines if the current Joomla! version and your current table support AJAX-powered drag and drop reordering.

Method Details

addCssFile() public method

Add a CSS file to the page generated by the CMS
public addCssFile ( string $uri, string $version = null, string $type = 'text/css', string $media = null, array $attribs = [] )
$uri string A path definition understood by parsePath, e.g. media://com_example/css/foo.css
$version string (optional) Version string to be added to the URL
$type string MIME type of the stylesheeet
$media string Media target definition of the style sheet, e.g. "screen"
$attribs array Array of attributes

addCssInline() public method

Adds an inline stylesheet (inline CSS) to the page header
public addCssInline ( string $css, string $type = 'text/css' )
$css string The stylesheet content to add
$type string The MIME type of the script

addJavascriptFile() public method

There are three combinations of defer and async (see http://www.w3schools.com/tags/att_script_defer.asp): * $defer false, $async true: The script is executed asynchronously with the rest of the page (the script will be executed while the page continues the parsing) * $defer true, $async false: The script is executed when the page has finished parsing. * $defer false, $async false. (default) The script is loaded and executed immediately. When it finishes loading the browser continues parsing the rest of the page. When you are using $defer = true there is no guarantee about the load order of the scripts. Whichever script loads first will be executed first. The order they appear on the page is completely irrelevant.
public addJavascriptFile ( string $uri, string $version = null, string $type = 'text/javascript', boolean $defer = false, boolean $async = false )
$uri string A path definition understood by parsePath, e.g. media://com_example/js/foo.js
$version string (optional) Version string to be added to the URL
$type string MIME type of the script
$defer boolean Adds the defer attribute, see above
$async boolean Adds the async attribute, see above

addJavascriptInline() public method

Adds an inline JavaScript script to the page header
public addJavascriptInline ( string $script, string $type = 'text/javascript' )
$script string The script content to add
$type string The MIME type of the script

addLess() public method

This method has integrated cache support. The compiled LESS files will be written to the media/lib_fof/compiled directory of your site. If the file cannot be written we will use the $cssUri, if specified
public addLess ( string $uri, string $cssUri, string $version = null, string $type = 'text/css', string $media = null, array $attribs = [] )
$uri string A path definition understood by parsePath pointing to the source LESS file, e.g. media://com_example/less/foo.less
$cssUri string A path definition understood by parsePath pointing to a precompiled CSS file, used when we can't write the generated file to the output directory, e.g. media://com_example/css/foo.css
$version string (optional) Version string to be added to the URL
$type string MIME type of the stylesheeet
$media string Media target definition of the style sheet, e.g. "screen"
$attribs array Array of attributes

escape() public method

Escapes a value for output in a view script.
public escape ( mixed $var ) : string
$var mixed The output to escape.
return string The escaped value.

getContainer() public method

Returns a reference to the container attached to this View
public getContainer ( ) : Container
return FOF30\Container\Container

getLayout() public method

Get the layout.
public getLayout ( ) : string
return string The layout name

getLists() public method

Returns the internal list of useful variables to the benefit of header fields.
public getLists ( ) : stdClass
return stdClass

getName() public method

The model name by default parsed using the classname, or it can be set by passing a $config['name'] in the class constructor
public getName ( ) : string
return string The name of the model

getPagination() public method

Returns a reference to the pagination object of this view
public getPagination ( ) : JPagination
return JPagination

getPerms() public method

Returns a reference to the permissions object of this view
public getPerms ( ) : stdClass
return stdClass

getTask() public method

Returns the task being rendered by the view
public getTask ( ) : string
return string

hasAjaxOrderingSupport() public method

If they do, it will set up the drag & drop reordering feature.
public hasAjaxOrderingSupport ( ) : boolean | array
return boolean | array False if not supported, otherwise a table with necessary information (saveOrder: should you enable DnD reordering; orderingColumn: which column has the ordering information).