You are here

public function SubstitutionManager::__construct in Linkit 8.5

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

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

Overrides DefaultPluginManager::__construct

File

src/SubstitutionManager.php, line 36

Class

SubstitutionManager
A plugin manager for the substitution plugins.

Namespace

Drupal\linkit

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct('Plugin/Linkit/Substitution', $namespaces, $module_handler, 'Drupal\\linkit\\SubstitutionInterface', 'Drupal\\linkit\\Annotation\\Substitution');
  $this
    ->alterInfo('linkit_substitution');
  $this
    ->setCacheBackend($cache_backend, 'linkit_substitution');
  $this->entityTypeManager = $entity_type_manager;
}