You are here

public function ElementInfoManager::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Render/ElementInfoManager.php \Drupal\Core\Render\ElementInfoManager::__construct()

Constructs a ElementInfoManager object.

Parameters

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

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

\Drupal\Core\Cache\CacheTagsInvalidatorInterface $cache_tag_invalidator: The cache tag invalidator.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke the alter hook with.

\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager.

Overrides DefaultPluginManager::__construct

File

core/lib/Drupal/Core/Render/ElementInfoManager.php, line 62

Class

ElementInfoManager
Provides a plugin manager for element plugins.

Namespace

Drupal\Core\Render

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, CacheTagsInvalidatorInterface $cache_tag_invalidator, ModuleHandlerInterface $module_handler, ThemeManagerInterface $theme_manager) {
  $this
    ->setCacheBackend($cache_backend, 'element_info');
  $this->themeManager = $theme_manager;
  $this->cacheTagInvalidator = $cache_tag_invalidator;
  parent::__construct('Element', $namespaces, $module_handler, 'Drupal\\Core\\Render\\Element\\ElementInterface', 'Drupal\\Core\\Render\\Annotation\\RenderElement');
  $this
    ->alterInfo('element_plugin');
}