You are here

public function LinkAttributesManager::__construct in Link Attributes widget 8

Constructs a LinkAttributesManager object.

Parameters

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

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

Overrides DefaultPluginManager::__construct

File

src/LinkAttributesManager.php, line 36

Class

LinkAttributesManager
Provides the link_attributes plugin manager.

Namespace

Drupal\link_attributes

Code

public function __construct(ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend) {
  $this
    ->alterInfo('link_attributes_plugin');
  $this->moduleHandler = $module_handler;
  $this
    ->setCacheBackend($cache_backend, 'link_attributes', [
    'link_attributes',
  ]);
}