3 namespace Drupal\libraries\ExternalLibrary;
6 * Provides an interface for external library managers.
8 interface LibraryManagerInterface {
11 * Gets a library by its ID.
16 * @return \Drupal\libraries\ExternalLibrary\LibraryInterface
19 * @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryDefinitionNotFoundException
20 * @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryTypeNotFoundException
21 * @throws \Drupal\Component\Plugin\Exception\PluginException
23 public function getLibrary($id);
26 * Gets the list of libraries that are required by enabled extensions.
28 * Modules, themes, and installation profiles can declare library dependencies
29 * by specifying a 'library_dependencies' key in their info files.
32 * An array of library IDs.
34 public function getRequiredLibraryIds();
37 * Loads library files for a library.
39 * Note that not all library types support explicit loading. Asset libraries,
40 * in particular, are declared to Drupal core's library system and are then
44 * The ID of the library.
46 * @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryDefinitionNotFoundException
47 * @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryNotInstalledException
49 public function load($id);