public function LinkSizesBase::output in Metatag 8
Generate the HTML tag output for a meta tag.
Return value
array|string A render array or an empty string.
Overrides LinkRelBase::output
File
- metatag_favicons/
src/ Plugin/ metatag/ Tag/ LinkSizesBase.php, line 15
Class
- LinkSizesBase
- This base plugin allows "link rel" tags with a "sizes" attribute.
Namespace
Drupal\metatag_favicons\Plugin\metatag\TagCode
public function output() {
$element = parent::output();
if ($element) {
$element['#attributes'] = [
'rel' => $this
->name(),
'sizes' => $this
->sizes(),
'href' => $element['#attributes']['href'],
];
}
return $element;
}