web\View setAssetManager()

setAssetManager() public method Sets the asset manager. public void setAssetManager ( $value )$value yii\web\AssetManager The asset manager

web\View renderBodyBeginHtml()

renderBodyBeginHtml() protected method Renders the content to be inserted at the beginning of the body section. The content is rendered using the registered JS code blocks and files. protected string renderBodyBeginHtml ( )return string The rendered content

web\View renderAjax()

renderAjax() public method Renders a view in response to an AJAX request. This method is similar to render() except that it will surround the view being rendered with the calls of beginPage(), head(), beginBody(), endBody() and endPage(). By doing so, the method is able to inject into the rendering result with JS/CSS scripts and files that are registered with the view. See also render(). public string renderAjax ( $view, $params = [], $context = null )$view string The view name. Please r

web\View renderHeadHtml()

renderHeadHtml() protected method Renders the content to be inserted in the head section. The content is rendered using the registered meta tags, link tags, CSS/JS code blocks and files. protected string renderHeadHtml ( )return string The rendered content

web\View renderBodyEndHtml()

renderBodyEndHtml() protected method Renders the content to be inserted at the end of the body section. The content is rendered using the registered JS code blocks and files. protected string renderBodyEndHtml ( $ajaxMode )$ajaxMode boolean Whether the view is rendering in AJAX mode. If true, the JS scripts registered at POS_READY and POS_LOAD positions will be rendered at the end of the view like normal scripts. return string The rendered content

web\View registerMetaTag()

registerMetaTag() public method Registers a meta tag. For example, a description meta tag can be added like the following: $view->registerMetaTag([ 'name' => 'description', 'content' => 'This website is about funny raccoons.' ]); will result in the meta tag <meta name="description" content="This website is about funny raccoons.">. public void registerMetaTag ( $options, $key = null )$options array The HTML attributes for the meta tag. $key string The key that id

web\View registerLinkTag()

registerLinkTag() public method Registers a link tag. For example, a link tag for a custom favicon can be added like the following: $view->registerLinkTag(['rel' => 'icon', 'type' => 'image/png', 'href' => '/myicon.png']); which will result in the following HTML: <link rel="icon" type="image/png" href="/myicon.png">. Note: To register link tags for CSS stylesheets, use registerCssFile() instead, which has more options for this kind of link tag. public void registerLinkT

web\View registerJs()

registerJs() public method Registers a JS code block. public void registerJs ( $js, $position = self::POS_READY, $key = null )$js string The JS code block to be registered $position integer The position at which the JS script tag should be inserted in a page. The possible values are: POS_HEAD: in the head section POS_BEGIN: at the beginning of the body section POS_END: at the end of the body section POS_LOAD: enclosed within jQuery(window).load(). Note that by using this position,

web\View registerJsFile()

registerJsFile() public method Registers a JS file. public void registerJsFile ( $url, $options = [], $key = null )$url string The JS file to be registered. $options array The HTML attributes for the script tag. The following options are specially handled and are not treated as HTML attributes: depends: array, specifies the names of the asset bundles that this JS file depends on. position: specifies where the JS script tag should be inserted in a page. The possible values are: POS_HE

web\View registerCss()

registerCss() public method Registers a CSS code block. public void registerCss ( $css, $options = [], $key = null )$css string The content of the CSS code block to be registered $options array The HTML attributes for the <style>-tag. $key string The key that identifies the CSS code block. If null, it will use $css as the key. If two CSS code blocks are registered with the same key, the latter will overwrite the former.