You are here

interface LibraryInterface in Libraries API 8.3

Provides an interface for different types of external libraries.

Hierarchy

Expanded class hierarchy of LibraryInterface

All classes that implement LibraryInterface

Related topics

15 files declare their use of LibraryInterface
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
DependentLibraryInterface.php in src/ExternalLibrary/Dependency/DependentLibraryInterface.php
InvalidLibraryDependencyException.php in src/ExternalLibrary/Exception/InvalidLibraryDependencyException.php

... See full list

File

src/ExternalLibrary/LibraryInterface.php, line 12

Namespace

Drupal\libraries\ExternalLibrary
View source
interface LibraryInterface {

  /**
   * Creates an instance of the library from its definition.
   *
   * @param string $id
   *   The library ID.
   * @param array $definition
   *   The library definition array.
   * @param \Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface $type
   *   The library type of this library.
   *
   * @return static
   */
  public static function create($id, array $definition, LibraryTypeInterface $type);

  /**
   * Returns the ID of the library.
   *
   * @return string
   *   The library ID. This must be unique among all known libraries.
   */
  public function getId();

  /**
   * Returns the library type of the library.
   *
   * @return \Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface
   *   The library of the library.
   */
  public function getType();

}

Members

Namesort descending Modifiers Type Description Overrides
LibraryInterface::create public static function Creates an instance of the library from its definition. 1
LibraryInterface::getId public function Returns the ID of the library.
LibraryInterface::getType public function Returns the library type of the library. 1