class CustomMetaTagHttpEquiv in Custom Meta 2.0.x
Custom configured meta tags will be available.
The meta tag's values will be based upon this annotation.
Plugin annotation
@MetatagTag(
id = "custom_meta_tag_http_equiv",
deriver = "Drupal\custom_meta\Plugin\Derivative\CustomMetaDeriverHttpEquiv",
label = @Translation("Custom http-equiv Meta tag"),
description = @Translation("This plugin will be cloned from these settings for each custom tag."),
name = "custom_meta_tag_http_equiv",
weight = 3,
group = "custom_meta",
type = "string",
secure = FALSE,
multiple = TRUE
)
Hierarchy
- class \Drupal\custom_meta\Plugin\metatag\Tag\CustomMetaTagHttpEquiv extends \Drupal\metatag\Plugin\metatag\Tag\MetaHttpEquivBase
Expanded class hierarchy of CustomMetaTagHttpEquiv
File
- src/
Plugin/ metatag/ Tag/ CustomMetaTagHttpEquiv.php, line 25
Namespace
Drupal\custom_meta\Plugin\metatag\TagView source
class CustomMetaTagHttpEquiv extends MetaHttpEquivBase {
/**
* {@inheritdoc}
*/
public function output() {
$element = parent::output();
// Unset empty values.
if (!empty($element)) {
foreach ($element as $key => $item) {
if ($item['#attributes'] && empty($item['#attributes']['content'])) {
unset($element[$key]);
}
}
}
return $element;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CustomMetaTagHttpEquiv:: |
public | function |