public function ConstraintManager::__construct

Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct().

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/Validation/ConstraintManager.php, line 47
Contains \Drupal\Core\Validation\ConstraintManager.

Class

ConstraintManager
Constraint plugin manager.

Namespace

Drupal\Core\Validation

Code

public function __construct(\Traversable $namespaces) {
  $this->discovery = new AnnotatedClassDiscovery('Validation/Constraint', $namespaces);
  $this->discovery = new StaticDiscoveryDecorator($this->discovery, array(
    $this,
    'registerDefinitions',
  ));
  $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
  $this->discovery = new ProcessDecorator($this->discovery, array(
    $this,
    'processDefinition',
  ));
  $this->discovery = new AlterDecorator($this->discovery, 'validation_constraint');
  $this->discovery = new CacheDecorator($this->discovery, 'validation_constraints:' . language(Language::TYPE_INTERFACE)->langcode);
  $this->factory = new DefaultFactory($this);
}