public function Context::hasReaction in Context 8.0
Same name and namespace in other branches
- 8.4 src/Entity/Context.php \Drupal\context\Entity\Context::hasReaction()
- 8 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 342
Class
- Context
- Defines the Context entity.
Namespace
Drupal\context\EntityCode
public function hasReaction($reaction_id) {
return $this
->getReactions()
->has($reaction_id);
}