Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LibraryDiscoveryInterface.php

function LibraryDiscoveryInterface::getLibraryByName

Gets a single library defined by an extension by name.

Parameters

string $extension: The name of the extension that registered a library.

string $name: The name of a registered library to retrieve.

Return value

array|false The definition of the requested library, if $name was passed and it exists, otherwise FALSE.

2 methods override LibraryDiscoveryInterface::getLibraryByName()
LibraryDiscovery::getLibraryByName in core/lib/Drupal/Core/Asset/LibraryDiscovery.php
Gets a single library defined by an extension by name.
LibraryDiscoveryCollector::getLibraryByName in core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php
Gets a single library defined by an extension by name.

File

core/lib/Drupal/Core/Asset/LibraryDiscoveryInterface.php, line 46

Class

LibraryDiscoveryInterface
Discovers information for asset (CSS/JavaScript) libraries.

Namespace

Drupal\Core\Asset

Code

public function getLibraryByName($extension, $name);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal