function LibraryDependencyResolver::getLibrariesWithDependencies

Same name in other branches
  1. 9 core/lib/Drupal/Core/Asset/LibraryDependencyResolver.php \Drupal\Core\Asset\LibraryDependencyResolver::getLibrariesWithDependencies()
  2. 8.9.x core/lib/Drupal/Core/Asset/LibraryDependencyResolver.php \Drupal\Core\Asset\LibraryDependencyResolver::getLibrariesWithDependencies()
  3. 10 core/lib/Drupal/Core/Asset/LibraryDependencyResolver.php \Drupal\Core\Asset\LibraryDependencyResolver::getLibrariesWithDependencies()

Overrides LibraryDependencyResolverInterface::getLibrariesWithDependencies

1 call to LibraryDependencyResolver::getLibrariesWithDependencies()
LibraryDependencyResolver::getMinimalRepresentativeSubset in core/lib/Drupal/Core/Asset/LibraryDependencyResolver.php
Gets the minimal representative subset of the given libraries.

File

core/lib/Drupal/Core/Asset/LibraryDependencyResolver.php, line 37

Class

LibraryDependencyResolver
Resolves the dependencies of asset (CSS/JavaScript) libraries.

Namespace

Drupal\Core\Asset

Code

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.