You are here

public function Context::hasReaction in Context 8

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

Check to see if the context has the specified reaction.

Parameters

string $reaction_id: The ID of the reaction to check for.

Return value

bool

Overrides ContextInterface::hasReaction

File

src/Entity/Context.php, line 344

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

public function hasReaction($reaction_id) {
  return $this
    ->getReactions()
    ->has($reaction_id);
}