public function LibraryDiscovery::getLibraryByName in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Asset/LibraryDiscovery.php \Drupal\Core\Asset\LibraryDiscovery::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.
Overrides LibraryDiscoveryInterface::getLibraryByName
File
- core/
lib/ Drupal/ Core/ Asset/ LibraryDiscovery.php, line 62 - Contains \Drupal\Core\Asset\LibraryDiscovery.
Class
- LibraryDiscovery
- Discovers available asset libraries in Drupal.
Namespace
Drupal\Core\AssetCode
public function getLibraryByName($extension, $name) {
$extension = $this
->getLibrariesByExtension($extension);
return isset($extension[$name]) ? $extension[$name] : FALSE;
}