You are here

public function GlobalTemplateCollection::setTemplate in Courier 8

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

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