Interface Yiisoft\Yii\View\Renderer\MetaTagsInjectionInterface
| Implemented by | Yiisoft\Yii\View\Renderer\CsrfViewInjection |
|---|
MetaTagsInjectionInterface is an interface that must be implemented by classes to inject meta tags.
Public 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
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;
Signup or Login in order to comment.