Loading core/lib/Drupal/Core/Condition/ConditionManager.php +6 −2 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ use Drupal\Component\Plugin\CategorizingPluginManagerInterface; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Executable\ExecutableException; use Drupal\Core\Executable\ExecutableManagerInterface; use Drupal\Core\Executable\ExecutableInterface; use Drupal\Core\Extension\ModuleHandlerInterface; Loading Loading @@ -71,8 +72,11 @@ public function createInstance($plugin_id, array $configuration = []) { * {@inheritdoc} */ 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"); } } Loading
core/lib/Drupal/Core/Condition/ConditionManager.php +6 −2 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ use Drupal\Component\Plugin\CategorizingPluginManagerInterface; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Executable\ExecutableException; use Drupal\Core\Executable\ExecutableManagerInterface; use Drupal\Core\Executable\ExecutableInterface; use Drupal\Core\Extension\ModuleHandlerInterface; Loading Loading @@ -71,8 +72,11 @@ public function createInstance($plugin_id, array $configuration = []) { * {@inheritdoc} */ 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"); } }