3 namespace Drupal\libraries\ExternalLibrary\Remote;
6 * Provides a trait for remote libraries.
8 trait RemoteLibraryTrait {
11 * The remote library URL.
18 * Checks whether the library has a remote URL.
20 * This check allows using the same library class for multiple libraries only
21 * some of which are available remotely.
24 * TRUE if the library has a remote URL; FALSE otherwise.
26 * @see \Drupal\libraries\ExternalLibrary\Remote\RemoteLibraryInterface::hasRemoteUrl()
28 public function hasRemoteUrl() {
29 return !empty($this->remoteUrl);
33 * Returns the remote URL of the library.
36 * The remote URL of the library.
38 * \Drupal\libraries\ExternalLibrary\Remote\RemoteLibraryInterface::getRemoteUrl()
40 public function getRemoteUrl() {
41 return $this->remoteUrl;