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.

Psalm Types

Name Value
MetaTagsConfig array<array-key, \Yiisoft\Html\Tag\Meta|array<string, mixed>>

Public Methods

Hide inherited methods

Method Description Defined By
getMetaTags() Returns array of meta tags for register via {@see \Yiisoft\View\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 \Yiisoft\View\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;