For example, a link tag for a custom favicon
can be added like the following:
php
$view->registerLinkTag(['rel' => 'icon', 'type' => 'image/png', 'href' => '/myicon.png']);
which will result in the following HTML: .
**Note:** To register link tags for CSS stylesheets, use View::registerCssFile instead, which
has more options for this kind of link tag.
public registerLinkTag ( array $options, string $key = null ) | ||
$options | array | the HTML attributes for the link tag. |
$key | string | the key that identifies the link tag. If two link tags are registered with the same key, the latter will overwrite the former. If this is null, the new link tag will be appended to the existing ones. |