public function LibraryDependencyResolver::getLibrariesWithDependencies in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Asset/LibraryDependencyResolver.php \Drupal\Core\Asset\LibraryDependencyResolver::getLibrariesWithDependencies()
- 9 core/lib/Drupal/Core/Asset/LibraryDependencyResolver.php \Drupal\Core\Asset\LibraryDependencyResolver::getLibrariesWithDependencies()
File
- core/
lib/ Drupal/ Core/ Asset/ LibraryDependencyResolver.php, line 37
Class
- LibraryDependencyResolver
- Resolves the dependencies of asset (CSS/JavaScript) libraries.
Namespace
Drupal\Core\AssetCode
public function getLibrariesWithDependencies(array $libraries) {
$return = [];
foreach ($libraries as $library) {
if (!isset($this->librariesDependencies[$library])) {
$this->librariesDependencies[$library] = $this
->doGetDependencies([
$library,
]);
}
$return += $this->librariesDependencies[$library];
}
return array_values($return);
}