function LinkRelationTypeManager::__construct

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Http/LinkRelationTypeManager.php \Drupal\Core\Http\LinkRelationTypeManager::__construct()
  2. 10 core/lib/Drupal/Core/Http/LinkRelationTypeManager.php \Drupal\Core\Http\LinkRelationTypeManager::__construct()
  3. 11.x 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',
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.