You are here

public function Context::getReactions in Context 8

Same name and namespace in other branches
  1. 8.4 src/Entity/Context.php \Drupal\context\Entity\Context::getReactions()
  2. 8.0 src/Entity/Context.php \Drupal\context\Entity\Context::getReactions()

Get a list of all the reactions.

Return value

ContextReactionInterface[]|ContextReactionPluginCollection

Overrides ContextInterface::getReactions

1 call to Context::getReactions()
Context::getPluginCollections in src/Entity/Context.php
Gets the plugin collections used by this entity.

File

src/Entity/Context.php, line 302

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

public function getReactions() {
  if (!$this->reactionsCollection) {
    $reactionManager = Drupal::service('plugin.manager.context_reaction');
    $this->reactionsCollection = new ContextReactionPluginCollection($reactionManager, $this->reactions);
  }
  return $this->reactionsCollection;
}