You are here

public function CourierTemplateCollection::getTemplateCollection in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Action/CourierTemplateCollection.php \Drupal\rng\Plugin\Action\CourierTemplateCollection::getTemplateCollection()
  2. 3.x src/Plugin/Action/CourierTemplateCollection.php \Drupal\rng\Plugin\Action\CourierTemplateCollection::getTemplateCollection()

Get the courier_template_collection object associated with this action.

Return value

\Drupal\courier\TemplateCollectionInterface|NULL A courier_template_collection object. NULL if it has not been created.

2 calls to CourierTemplateCollection::getTemplateCollection()
CourierTemplateCollection::buildConfigurationForm in src/Plugin/Action/CourierTemplateCollection.php
Form constructor.
CourierTemplateCollection::execute in src/Plugin/Action/CourierTemplateCollection.php
Sends the message.

File

src/Plugin/Action/CourierTemplateCollection.php, line 176

Class

CourierTemplateCollection
Creates a template collection and provides a user interface to its templates.

Namespace

Drupal\rng\Plugin\Action

Code

public function getTemplateCollection() {
  if (isset($this->configuration['template_collection'])) {
    return $this->entityManager
      ->getStorage('courier_template_collection')
      ->load($this->configuration['template_collection']);
  }
  return NULL;
}