You are here

public function LibraryBase::__construct in Libraries API 8.3

Constructs a library.

Parameters

string $id: The library ID.

array $definition: The library definition array.

\Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface $type: The library type of this library.

3 calls to LibraryBase::__construct()
AssetLibrary::__construct in src/ExternalLibrary/Asset/AssetLibrary.php
Construct an external library.
MultipleAssetLibrary::__construct in src/ExternalLibrary/Asset/MultipleAssetLibrary.php
Construct an external library.
PhpFileLibrary::__construct in src/ExternalLibrary/PhpFile/PhpFileLibrary.php
Constructs a PHP file library.
3 methods override LibraryBase::__construct()
AssetLibrary::__construct in src/ExternalLibrary/Asset/AssetLibrary.php
Construct an external library.
MultipleAssetLibrary::__construct in src/ExternalLibrary/Asset/MultipleAssetLibrary.php
Construct an external library.
PhpFileLibrary::__construct in src/ExternalLibrary/PhpFile/PhpFileLibrary.php
Constructs a PHP file library.

File

src/ExternalLibrary/LibraryBase.php, line 44

Class

LibraryBase
Provides a base external library implementation.

Namespace

Drupal\libraries\ExternalLibrary

Code

public function __construct($id, array $definition, LibraryTypeInterface $type) {
  $this->id = (string) $id;
  $this->type = $type;
  $this->dependencies = $definition['dependencies'];
  $this->versionDetector = $definition['version_detector'];
}