interface RemoteLibraryInterface in Libraries API 8.3
Provides an interface for remote libraries.
Assuming they declare a remote URL, remote libraries are always loaded. It is not checked whether or not the Drupal site has network access or the remote resource is available.
Hierarchy
- interface \Drupal\libraries\ExternalLibrary\LibraryInterface
- interface \Drupal\libraries\ExternalLibrary\Remote\RemoteLibraryInterface
Expanded class hierarchy of RemoteLibraryInterface
All classes that implement RemoteLibraryInterface
2 files declare their use of RemoteLibraryInterface
- AssetLibrary.php in src/
ExternalLibrary/ Asset/ AssetLibrary.php - MultipleAssetLibrary.php in src/
ExternalLibrary/ Asset/ MultipleAssetLibrary.php
File
- src/
ExternalLibrary/ Remote/ RemoteLibraryInterface.php, line 14
Namespace
Drupal\libraries\ExternalLibrary\RemoteView source
interface RemoteLibraryInterface extends LibraryInterface {
/**
* Checks whether the library has a remote URL.
*
* This check allows using the same library class for multiple libraries only
* some of which are available remotely.
*
* @return bool
* TRUE if the library has a remote URL; FALSE otherwise.
*
* @see \Drupal\libraries\ExternalLibrary\Asset\AssetLibraryInterface
*/
public function hasRemoteUrl();
/**
* Returns the remote URL of the library.
*
* @return string
* The remote URL of the library.
*
* @todo Consider throwing an exception if hasRemoteUrl() return FALSE.
*/
public function getRemoteUrl();
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LibraryInterface:: |
public static | function | Creates an instance of the library from its definition. | 1 |
LibraryInterface:: |
public | function | Returns the ID of the library. | |
LibraryInterface:: |
public | function | Returns the library type of the library. | 1 |
RemoteLibraryInterface:: |
public | function | Returns the remote URL of the library. | |
RemoteLibraryInterface:: |
public | function | Checks whether the library has a remote URL. |