LibraryDiscovery
class LibraryDiscovery implements LibraryDiscoveryInterface (View source)
Discovers available asset libraries in Drupal.
Properties
| protected CacheCollectorInterface | $collector | The library discovery cache collector. |
|
| protected array | $libraryDefinitions | The final library definitions, statically cached. |
Methods
__construct(CacheCollectorInterface $library_discovery_collector)
Constructs a new LibraryDiscovery instance.
array
getLibrariesByExtension(string $extension)
Gets all libraries defined by an extension.
array|false
getLibraryByName(string $extension, string $name)
Gets a single library defined by an extension by name.
clearCachedDefinitions()
Clears static and persistent library definition caches.
Details
__construct(CacheCollectorInterface $library_discovery_collector)
Constructs a new LibraryDiscovery instance.
array
getLibrariesByExtension(string $extension)
Gets all libraries defined by an extension.
array|false
getLibraryByName(string $extension, string $name)
Gets a single library defined by an extension by name.
clearCachedDefinitions()
Clears static and persistent library definition caches.