Further modules included.
[yaffs-website] / web / modules / contrib / libraries / src / ExternalLibrary / LibraryManagerInterface.php
1 <?php
2
3 namespace Drupal\libraries\ExternalLibrary;
4
5 /**
6  * Provides an interface for external library managers.
7  */
8 interface LibraryManagerInterface {
9
10   /**
11    * Gets a library by its ID.
12    *
13    * @param string $id
14    *   The library ID.
15    *
16    * @return \Drupal\libraries\ExternalLibrary\LibraryInterface
17    *   The library object.
18    *
19    * @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryDefinitionNotFoundException
20    * @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryTypeNotFoundException
21    * @throws \Drupal\Component\Plugin\Exception\PluginException
22    */
23   public function getLibrary($id);
24
25   /**
26    * Gets the list of libraries that are required by enabled extensions.
27    *
28    * Modules, themes, and installation profiles can declare library dependencies
29    * by specifying a 'library_dependencies' key in their info files.
30    *
31    * @return string[]
32    *   An array of library IDs.
33    */
34   public function getRequiredLibraryIds();
35
36   /**
37    * Loads library files for a library.
38    *
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
41    * loaded using that.
42    *
43    * @param string $id
44    *   The ID of the library.
45    *
46    * @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryDefinitionNotFoundException
47    * @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryNotInstalledException
48    */
49   public function load($id);
50
51 }