public function Context::hasCondition in Context 8
Same name and namespace in other branches
- 8.4 src/Entity/Context.php \Drupal\context\Entity\Context::hasCondition()
- 8.0 src/Entity/Context.php \Drupal\context\Entity\Context::hasCondition()
Check to see if the context has the specified condition.
Parameters
string $condition_id: The ID of the condition to check for.
Return value
bool
Overrides ContextInterface::hasCondition
File
- src/
Entity/ Context.php, line 295
Class
- Context
- Defines the Context entity.
Namespace
Drupal\context\EntityCode
public function hasCondition($condition_id) {
return $this
->getConditions()
->has($condition_id);
}