You are here

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\Tag

Code

public function output() {
  $element = parent::output();
  if ($element) {
    $element['#attributes'] = [
      'rel' => $this
        ->name(),
      'sizes' => $this
        ->sizes(),
      'href' => $element['#attributes']['href'],
    ];
  }
  return $element;
}