public function EditorManager::__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/modules/editor/lib/Drupal/editor/Plugin/EditorManager.php, line 29
Contains \Drupal\editor\Plugin\InPlaceEditorManager.

Class

EditorManager
Configurable text editor manager.

Namespace

Drupal\editor\Plugin

Code

public function __construct(\Traversable $namespaces) {
  $annotation_namespaces = array(
    'Drupal\\editor\\Annotation' => $namespaces['Drupal\\editor'],
  );
  $this->discovery = new AnnotatedClassDiscovery('Editor', $namespaces, $annotation_namespaces, 'Drupal\\editor\\Annotation\\Editor');
  $this->discovery = new AlterDecorator($this->discovery, 'editor_info');
  $this->discovery = new CacheDecorator($this->discovery, 'editor');
  $this->factory = new DefaultFactory($this->discovery);
}