You are here

public function MetatagManager::getGlobalMetatags in Metatag 8

Returns global meta tags.

Return value

\Drupal\metatag\Entity\MetatagDefaults|null The global meta tags or NULL.

1 call to MetatagManager::getGlobalMetatags()
MetatagManager::getDefaultMetatags in src/MetatagManager.php
Returns default meta tags for an entity.

File

src/MetatagManager.php, line 419

Class

MetatagManager
Class MetatagManager.

Namespace

Drupal\metatag

Code

public function getGlobalMetatags() {
  $metatags = $this->metatagDefaults
    ->load('global');
  return !empty($metatags) && $metatags
    ->status() ? $metatags : NULL;
}