W3cubDocs

/Drupal 8

public function ElementInfoManager::__construct

public ElementInfoManager::__construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, CacheTagsInvalidatorInterface $cache_tag_invalidator, ModuleHandlerInterface $module_handler, ThemeManagerInterface $theme_manager)

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');
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!ElementInfoManager.php/function/ElementInfoManager::__construct/8.1.x