LibraryDiscoveryCollector::__construct

public LibraryDiscoveryCollector::__construct(CacheBackendInterface $cache, LockBackendInterface $lock, LibraryDiscoveryParser $discovery_parser, ThemeManagerInterface $theme_manager)

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

1
2
3
4
5
6
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;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.