You are here

public function MetatagDefaults::hasTag in Metatag 8

Returns TRUE if a tag exists.

Parameters

string $tag_id: The identifier of the tag.

Return value

bool TRUE if the tag exists.

1 call to MetatagDefaults::hasTag()
MetatagDefaults::getTag in src/Entity/MetatagDefaults.php
Returns the value of a tag.

File

src/Entity/MetatagDefaults.php, line 78

Class

MetatagDefaults
Defines the Metatag defaults entity.

Namespace

Drupal\metatag\Entity

Code

public function hasTag($tag_id) {
  return array_key_exists($tag_id, $this->tags);
}