Property | Type | Description | |
---|---|---|---|
$assetBundles | list of the registered asset bundles. The keys are the bundle names, and the values are the registered AssetBundle objects. | ||
$css | the registered CSS code blocks. | ||
$cssFiles | the registered CSS files. | ||
$js | the registered JS code blocks | ||
$jsFiles | the registered JS files. | ||
$linkTags | the registered link tags. | ||
$metaTags | the registered meta tags. | ||
$title | the page title |
Method | Description | |
---|---|---|
beginBody ( ) | Marks the beginning of an HTML body section. | |
clear ( ) | Clears up the registered meta tags, link tags, css/js scripts and files. | |
endBody ( ) | Marks the ending of an HTML body section. | |
endPage ( boolean $ajaxMode = false ) | Marks the ending of an HTML page. | |
getAssetManager ( ) : |
Registers the asset manager being used by this view object. | |
head ( ) | Marks the position of an HTML head section. | |
registerAssetBundle ( string $name, integer | null $position = null ) : |
Registers the named asset bundle. | |
registerCss ( string $css, array $options = [], string $key = null ) | Registers a CSS code block. | |
registerCssFile ( string $url, array $options = [], string $key = null ) | Registers a CSS file. | |
registerJs ( string $js, integer $position = self::POS_READY, string $key = null ) | Registers a JS code block. | |
registerJsFile ( string $url, array $options = [], string $key = null ) | Registers a JS file. | |
registerLinkTag ( array $options, string $key = null ) | Registers a link tag. | |
registerMetaTag ( array $options, string $key = null ) | Registers a meta tag. | |
renderAjax ( string $view, array $params = [], object $context = null ) : string | Renders a view in response to an AJAX request. | |
setAssetManager ( |
Sets the asset manager. |
Method | Description | |
---|---|---|
registerAssetFiles ( string $name ) | Registers all files provided by an asset bundle including depending bundles files. | |
renderBodyBeginHtml ( ) : string | Renders the content to be inserted at the beginning of the body section. | |
renderBodyEndHtml ( boolean $ajaxMode ) : string | Renders the content to be inserted at the end of the body section. | |
renderHeadHtml ( ) : string | Renders the content to be inserted in the head section. |
public clear ( ) |
public getAssetManager ( ) : |
||
return | the asset manager. Defaults to the "assetManager" application component. |
public registerAssetBundle ( string $name, integer | null $position = null ) : |
||
$name | string | the class name of the asset bundle (without the leading backslash) |
$position | integer | null | if set, this forces a minimum position for javascript files. This will adjust depending assets javascript file position or fail if requirement can not be met. If this is null, asset bundles position settings will not be changed. See [[registerJsFile]] for more details on javascript position. |
return | the registered asset bundle instance |
protected registerAssetFiles ( string $name ) | ||
$name | string | name of the bundle to register |