public function WidgetPluginManager::__construct

Constructs a WidgetPluginManager 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/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php, line 45
Definition of Drupal\field\Plugin\Type\Widget\WidgetPluginManager.

Class

WidgetPluginManager
Plugin type manager for field widgets.

Namespace

Drupal\field\Plugin\Type\Widget

Code

public function __construct(\Traversable $namespaces) {
  $this->discovery = new AnnotatedClassDiscovery('field/widget', $namespaces);
  $this->discovery = new ProcessDecorator($this->discovery, array(
    $this,
    'processDefinition',
  ));
  $this->discovery = new AlterDecorator($this->discovery, 'field_widget_info');
  $this->discovery = new CacheDecorator($this->discovery, 'field_widget_types', 'field');
  $this->factory = new WidgetFactory($this->discovery);
}