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 identifies the meta tag. If two meta tags are registered with the same key, the latter will overwrite the former. If this is null, the new meta tag will be appended to the existing ones.

doc_Yii
2016-10-30 17:17:35
Comments
Leave a Comment

Please login to continue.