You are here

public function MetatagDefaults::getTag in Metatag 8

Returns the value of a tag.

Parameters

string $tag_id: The identifier of the tag.

Return value

array|null Array containing the tag values or NULL if not found.

File

src/Entity/MetatagDefaults.php, line 91

Class

MetatagDefaults
Defines the Metatag defaults entity.

Namespace

Drupal\metatag\Entity

Code

public function getTag($tag_id) {
  if (!$this
    ->hasTag($tag_id)) {
    return NULL;
  }
  return $this->tags[$tag_id];
}