You are here

public function GlobalTemplateCollection::setTemplate in Courier 2.x

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

Set configuration for a template type.

Parameters

string $entity_type_id: A template entity type ID.

mixed $content: Mixed configuration for the template.

Return value

static Return this global template collection.

Overrides GlobalTemplateCollectionInterface::setTemplate

File

src/Entity/GlobalTemplateCollection.php, line 86

Class

GlobalTemplateCollection
Defines a sync-able template collection.

Namespace

Drupal\courier\Entity

Code

public function setTemplate($entity_type_id, $content) {
  $this->templates[$entity_type_id] = [
    'type' => $entity_type_id,
    'content' => $content,
  ];
  return $this;
}