You are here

public function GlobalTemplateCollection::getTemplateCollection in Courier 2.x

Same name and namespace in other branches
  1. 8 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 62

Class

GlobalTemplateCollection
Defines a sync-able template collection.

Namespace

Drupal\courier\Entity

Code

public 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);
}