You are here

public function LibraryDiscoveryCollector::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php \Drupal\Core\Asset\LibraryDiscoveryCollector::__construct()

Constructs a CacheCollector object.

Parameters

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

\Drupal\Core\Lock\LockBackendInterface $lock: The lock backend.

\Drupal\Core\Asset\LibraryDiscoveryParser $discovery_parser: The library discovery parser.

\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager.

Overrides CacheCollector::__construct

File

core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php, line 44

Class

LibraryDiscoveryCollector
A CacheCollector implementation for building library extension info.

Namespace

Drupal\Core\Asset

Code

public function __construct(CacheBackendInterface $cache, LockBackendInterface $lock, LibraryDiscoveryParser $discovery_parser, ThemeManagerInterface $theme_manager) {
  $this->themeManager = $theme_manager;
  parent::__construct(NULL, $cache, $lock, [
    'library_info',
  ]);
  $this->discoveryParser = $discovery_parser;
}