You are here

public function TemplateCollection::getContext in Courier 2.x

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

Gets the context entity.

Return value

\Drupal\courier\CourierContextInterface|null The context entity, or NULL if it does not exist.

Overrides TemplateCollectionInterface::getContext

1 call to TemplateCollection::getContext()
TemplateCollection::validateTokenValues in src/Entity/TemplateCollection.php
Ensures tokens specified by context have values in this collection.

File

src/Entity/TemplateCollection.php, line 35

Class

TemplateCollection
Defines a local template collection entity.

Namespace

Drupal\courier\Entity

Code

public function getContext() {
  return $this
    ->get('context')->entity;
}