コード例 #1
0
ファイル: AssetLibrary.php プロジェクト: hugronaphor/cornel
 /**
  * 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'];
 }
コード例 #2
0
ファイル: PhpFileLibrary.php プロジェクト: hugronaphor/cornel
 /**
  * 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'];
 }
コード例 #3
0
 /**
  * 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'];
 }