You are here

function TemplateCollection::getContext in Courier 8

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

Class

TemplateCollection
Defines a local template collection entity.

Namespace

Drupal\courier\Entity

Code

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