You are here

public function AssetInjectorCss::libraryInfo in Asset Injector 8.2

Gets the library array used in library_info_build.

Return value

array Library info array for this asset.

Overrides AssetInjectorBase::libraryInfo

File

src/Entity/AssetInjectorCss.php, line 80

Class

AssetInjectorCss
Defines the CSS Injector entity.

Namespace

Drupal\asset_injector\Entity

Code

public function libraryInfo() {
  $path = $this
    ->filePathRelativeToDrupalRoot();
  $library_info = [
    'css' => [
      'theme' => [
        $path => [
          'weight' => 0,
          'preprocess' => $this->preprocess,
          'media' => $this->media,
        ],
      ],
    ],
  ];
  return $library_info;
}