0 follower

Interface Yiisoft\Yii\View\Renderer\MetaTagsInjectionInterface

Implemented byYiisoft\Yii\View\Renderer\CsrfViewInjection

MetaTagsInjectionInterface is an interface that must be implemented by classes to inject meta tags.

Public Methods

Hide inherited methods

Method Description Defined By
getMetaTags() Returns array of meta tags for register via {@see WebView::registerMetaTag()}. Yiisoft\Yii\View\Renderer\MetaTagsInjectionInterface

Method Details

Hide inherited methods

getMetaTags() public abstract method

Returns array of meta tags for register via {@see WebView::registerMetaTag()}.

Optionally, you may use string keys of array as identifies the meta tag.

For example:

[
    Html::meta()
        ->name('http-equiv')
        ->content('public'),
    'noindex' => Html::meta()
        ->name('robots')
        ->content('noindex'),
    [
        'name' => 'description',
        'content' => 'This website is about funny raccoons.',
    ],
    'keywords' => [
        'name' => 'keywords',
        'content' => 'yii,framework',
    ],
    ...
]
public abstract array getMetaTags ( )

                public function getMetaTags(): array;