You are here

public function GlobalTemplateCollectionManagerInterface::createGlobalCollectionForLocalCollection in Courier 2.x

Same name and namespace in other branches
  1. 8 src/Service/GlobalTemplateCollectionManagerInterface.php \Drupal\courier\Service\GlobalTemplateCollectionManagerInterface::createGlobalCollectionForLocalCollection()

Create a global template collection and associate it with a template collection.

Parameters

\Drupal\courier\TemplateCollectionInterface $template_collection: A local template collection entity.

array $defaults: Default values to add to the new global template collection. This value must contain a 'id' key which does not conflict with existing global template collections.

Return value

\Drupal\courier\Entity\GlobalTemplateCollectionInterface A new and saved global template collection.

Throws

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

1 method overrides GlobalTemplateCollectionManagerInterface::createGlobalCollectionForLocalCollection()
GlobalTemplateCollectionManager::createGlobalCollectionForLocalCollection in src/Service/GlobalTemplateCollectionManager.php
Create a global template collection and associate it with a template collection.

File

src/Service/GlobalTemplateCollectionManagerInterface.php, line 58

Class

GlobalTemplateCollectionManagerInterface
Interface for the global template collection manager.

Namespace

Drupal\courier\Service

Code

public function createGlobalCollectionForLocalCollection(TemplateCollectionInterface $template_collection, array $defaults = []);