You are here

public function TcaPluginManager::__construct in Token Content Access 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/TcaPluginManager.php \Drupal\tca\Plugin\TcaPluginManager::__construct()

Constructor for TcaPluginManager objects.

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\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke the alter hook with.

\Drupal\Core\Entity\EntityTypeManagerInterface $etm: The entity type manager service.

Overrides DefaultPluginManager::__construct

File

src/Plugin/TcaPluginManager.php, line 35

Class

TcaPluginManager
Provides the TCA plugin manager.

Namespace

Drupal\tca\Plugin

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $etm) {
  parent::__construct('Plugin/TcaPlugin', $namespaces, $module_handler, 'Drupal\\tca\\Plugin\\TcaPluginInterface', 'Drupal\\tca\\Annotation\\TcaPlugin');
  $this
    ->alterInfo('tca_plugin_info');
  $this
    ->setCacheBackend($cache_backend, 'tca_plugin_plugins');
  $this->etm = $etm;
}