LibraryDiscoveryInterface

Discovers information for asset (CSS/JavaScript) libraries.

Library information is statically cached. Libraries are keyed by extension for several reasons:

  • Libraries are not unique. Multiple extensions might ship with the same library in a different version or variant. This registry cannot (and does not attempt to) prevent library conflicts.
  • Extensions implementing and thereby depending on a library that is registered by another extension can only rely on that extension's library.
  • Two (or more) extensions can still register the same library and use it without conflicts in case the libraries are loaded on certain pages only.

Hierarchy

File

core/lib/Drupal/Core/Asset/LibraryDiscoveryInterface.php, line 18

Namespace

Drupal\Core\Asset

Members

Name Modifiers Type Description
LibraryDiscoveryInterface::clearCachedDefinitions public function Clears static and persistent library definition caches.
LibraryDiscoveryInterface::getLibrariesByExtension public function Gets all libraries defined by an extension.
LibraryDiscoveryInterface::getLibraryByName public function Gets a single library defined by an extension by name.
doc_Drupal
2016-10-29 09:23:09
Comments
Leave a Comment

Please login to continue.