/** * Construct an external library. * * @param string $id * The library ID. * @param array $definition * The library definition array. * @param \Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface $library_type * The library type of the library. */ public function __construct($id, array $definition, LibraryTypeInterface $library_type) { parent::__construct($id, $definition, $library_type); $this->remoteUrl = $definition['remote_url']; $this->cssAssets = $definition['css']; $this->jsAssets = $definition['js']; $this->attachableDependencies = $definition['attachable_dependencies']; }
/** * Constructs a PHP file library. * * @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. */ public function __construct($id, array $definition, LibraryTypeInterface $type) { parent::__construct($id, $definition, $type); $this->files = $definition['files']; }
/** * Construct an external library. * * @param string $id * The library ID. * @param array $definition * The library definition array. * @param \Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface $library_type * The library type of the library. */ public function __construct($id, array $definition, LibraryTypeInterface $library_type) { parent::__construct($id, $definition, $library_type); $this->remoteUrl = $definition['remote_url']; $this->libraries = $definition['libraries']; }