interface LibraryManagerInterface in Libraries API 8.3
Provides an interface for external library managers.
Hierarchy
- interface \Drupal\libraries\ExternalLibrary\LibraryManagerInterface
Expanded class hierarchy of LibraryManagerInterface
All classes that implement LibraryManagerInterface
7 files declare their use of LibraryManagerInterface
- AssetLibrary.php in src/
ExternalLibrary/ Asset/ AssetLibrary.php - AssetLibraryInterface.php in src/
ExternalLibrary/ Asset/ AssetLibraryInterface.php - AssetLibraryType.php in src/
Plugin/ libraries/ Type/ AssetLibraryType.php - AttachableAssetLibraryRegistrationInterface.php in src/
ExternalLibrary/ Asset/ AttachableAssetLibraryRegistrationInterface.php - MultipleAssetLibrary.php in src/
ExternalLibrary/ Asset/ MultipleAssetLibrary.php
File
- src/
ExternalLibrary/ LibraryManagerInterface.php, line 8
Namespace
Drupal\libraries\ExternalLibraryView source
interface LibraryManagerInterface {
/**
* Gets a library by its ID.
*
* @param string $id
* The library ID.
*
* @return \Drupal\libraries\ExternalLibrary\LibraryInterface
* The library object.
*
* @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryDefinitionNotFoundException
* @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryTypeNotFoundException
* @throws \Drupal\Component\Plugin\Exception\PluginException
*/
public function getLibrary($id);
/**
* Gets the list of libraries that are required by enabled extensions.
*
* Modules, themes, and installation profiles can declare library dependencies
* by specifying a 'library_dependencies' key in their info files.
*
* @return string[]
* An array of library IDs.
*/
public function getRequiredLibraryIds();
/**
* Loads library files for a library.
*
* Note that not all library types support explicit loading. Asset libraries,
* in particular, are declared to Drupal core's library system and are then
* loaded using that.
*
* @param string $id
* The ID of the library.
*
* @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryDefinitionNotFoundException
* @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryNotInstalledException
*/
public function load($id);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LibraryManagerInterface:: |
public | function | Gets a library by its ID. | 1 |
LibraryManagerInterface:: |
public | function | Gets the list of libraries that are required by enabled extensions. | 1 |
LibraryManagerInterface:: |
public | function | Loads library files for a library. | 1 |