You are here

public function LinkRelationTypeManager::__construct in Drupal 8

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

Constructs a new LinkRelationTypeManager.

Parameters

string $root: The app root.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.

Overrides DefaultPluginManager::__construct

File

core/lib/Drupal/Core/Http/LinkRelationTypeManager.php, line 42

Class

LinkRelationTypeManager
Provides a default plugin manager for link relation types.

Namespace

Drupal\Core\Http

Code

public function __construct($root, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache) {
  $this->root = $root;
  $this->pluginInterface = LinkRelationTypeInterface::class;
  $this->moduleHandler = $module_handler;
  $this
    ->setCacheBackend($cache, 'link_relation_type_plugins', [
    'link_relation_type',
  ]);
}