function ConditionManager::execute
Same name in other branches
- 9 core/lib/Drupal/Core/Condition/ConditionManager.php \Drupal\Core\Condition\ConditionManager::execute()
- 8.9.x core/lib/Drupal/Core/Condition/ConditionManager.php \Drupal\Core\Condition\ConditionManager::execute()
- 10 core/lib/Drupal/Core/Condition/ConditionManager.php \Drupal\Core\Condition\ConditionManager::execute()
Overrides ExecutableManagerInterface::execute
File
-
core/
lib/ Drupal/ Core/ Condition/ ConditionManager.php, line 74
Class
- ConditionManager
- A plugin manager for condition plugins.
Namespace
Drupal\Core\ConditionCode
public function execute(ExecutableInterface $condition) {
if ($condition instanceof ConditionInterface) {
$result = $condition->evaluate();
return $condition->isNegated() ? !$result : $result;
}
throw new ExecutableException("This manager object can only execute condition plugins");
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.