You are here

function GlobalTemplateCollectionManagerInterface::createGlobalCollectionForLocalCollection in Courier 8

Same name and namespace in other branches
  1. 2.x 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 56

Class

GlobalTemplateCollectionManagerInterface
Interface for the global template collection manager.

Namespace

Drupal\courier\Service

Code

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