You are here

public function Context::hasReaction in Context 8.4

Same name and namespace in other branches
  1. 8 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 TRUE if the context has the specified reaction, FALSE if not.

Overrides ContextInterface::hasReaction

File

src/Entity/Context.php, line 347

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

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