You are here

function GlobalTemplateCollection::getTemplateCollection in Courier 8

Same name and namespace in other branches
  1. 2.x src/Entity/GlobalTemplateCollection.php \Drupal\courier\Entity\GlobalTemplateCollection::getTemplateCollection()

Get the local Template Collection for this global template collection.

Return value

\Drupal\courier\TemplateCollectionInterface A template collection entity.

Throws

\Drupal\courier\Exception\GlobalTemplateCollectionException Thrown if this global template collection is unsaved.

Overrides GlobalTemplateCollectionInterface::getTemplateCollection

File

src/Entity/GlobalTemplateCollection.php, line 56

Class

GlobalTemplateCollection
Defines a sync-able template collection.

Namespace

Drupal\courier\Entity

Code

function getTemplateCollection() {

  /** @var \Drupal\courier\Service\GlobalTemplateCollectionManagerInterface $template_collection_manager */
  $template_collection_manager = \Drupal::service('courier.manager.global_template_collection');
  return $template_collection_manager
    ->getLocalCollection($this);
}