public function ConditionManager::__construct

Constructs aa ConditionManager object.

Parameters

\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations,

File

drupal/core/lib/Drupal/Core/Condition/ConditionManager.php, line 32
Contains \Drupal\Core\Condition\ConditionManager.

Class

ConditionManager
A plugin manager for condition plugins.

Namespace

Drupal\Core\Condition

Code

public function __construct(\Traversable $namespaces) {
  $this->discovery = new AnnotatedClassDiscovery('Condition', $namespaces);
  $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
  $this->discovery = new AlterDecorator($this->discovery, 'condition_info');
  $this->discovery = new CacheDecorator($this->discovery, 'condition:' . language(Language::TYPE_INTERFACE)->langcode);
  $this->factory = new DefaultFactory($this);
}