diff --git a/core/lib/Drupal/Core/Condition/ConditionManager.php b/core/lib/Drupal/Core/Condition/ConditionManager.php index dca73ff..c4c3dc0 100644 --- a/core/lib/Drupal/Core/Condition/ConditionManager.php +++ b/core/lib/Drupal/Core/Condition/ConditionManager.php @@ -39,18 +39,13 @@ class ConditionManager extends DefaultPluginManager implements ExecutableManager * The module handler to invoke the alter hook with. */ public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ModuleHandlerInterface $module_handler) { + $this->alterInfo($module_handler, 'condition_info'); + $this->setCacheBackend($cache_backend, $language_manager, 'condition'); + $annotation_namespaces = array( 'Drupal\Core\Condition\Annotation' => DRUPAL_ROOT . '/core/lib', ); - $this->discovery = new AnnotatedClassDiscovery('Condition', $namespaces, $annotation_namespaces, 'Drupal\Core\Condition\Annotation\Condition'); - $this->discovery = new DerivativeDiscoveryDecorator($this->discovery); - $this->discovery = new AlterDecorator($this->discovery, 'condition_info'); - $this->discovery = new CacheDecorator($this->discovery, 'condition:' . $language_manager->getLanguage(Language::TYPE_INTERFACE)->langcode); - - $this->factory = new ContainerFactory($this); - - $this->alterInfo($module_handler, 'condition_info'); - $this->setCacheBackend($cache_backend, $language_manager, 'condition'); + parent::__construct('Condition', $namespaces, $annotation_namespaces,'Drupal\Core\Condition\Annotation\Condition'); } /**