You are here

public function Context::getReaction in Context 8

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

Get a reaction with the specified ID.

Parameters

string $reaction_id: The ID of the reaction to get.

Return value

ContextReactionInterface

Overrides ContextInterface::getReaction

File

src/Entity/Context.php, line 314

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

public function getReaction($reaction_id) {
  return $this
    ->getReactions()
    ->get($reaction_id);
}