You are here

protected static function LibraryBase::processDefinition in Libraries API 8.3

Gets library definition defaults.

Parameters

array $definition: A library definition array.

4 calls to LibraryBase::processDefinition()
AssetLibrary::processDefinition in src/ExternalLibrary/Asset/AssetLibrary.php
Gets library definition defaults.
LibraryBase::create in src/ExternalLibrary/LibraryBase.php
Creates an instance of the library from its definition.
MultipleAssetLibrary::processDefinition in src/ExternalLibrary/Asset/MultipleAssetLibrary.php
Gets library definition defaults.
PhpFileLibrary::processDefinition in src/ExternalLibrary/PhpFile/PhpFileLibrary.php
Gets library definition defaults.
3 methods override LibraryBase::processDefinition()
AssetLibrary::processDefinition in src/ExternalLibrary/Asset/AssetLibrary.php
Gets library definition defaults.
MultipleAssetLibrary::processDefinition in src/ExternalLibrary/Asset/MultipleAssetLibrary.php
Gets library definition defaults.
PhpFileLibrary::processDefinition in src/ExternalLibrary/PhpFile/PhpFileLibrary.php
Gets library definition defaults.

File

src/ExternalLibrary/LibraryBase.php, line 65

Class

LibraryBase
Provides a base external library implementation.

Namespace

Drupal\libraries\ExternalLibrary

Code

protected static function processDefinition(array &$definition) {
  $definition += [
    'dependencies' => [],
    // @todo This fallback is not very elegant.
    'version_detector' => [
      'id' => 'static',
      'configuration' => [
        'version' => '',
      ],
    ],
  ];
}