function AttachedAssets::setLibraries

Same name in other branches
  1. 9 core/lib/Drupal/Core/Asset/AttachedAssets.php \Drupal\Core\Asset\AttachedAssets::setLibraries()
  2. 8.9.x core/lib/Drupal/Core/Asset/AttachedAssets.php \Drupal\Core\Asset\AttachedAssets::setLibraries()
  3. 11.x core/lib/Drupal/Core/Asset/AttachedAssets.php \Drupal\Core\Asset\AttachedAssets::setLibraries()

Overrides AttachedAssetsInterface::setLibraries

File

core/lib/Drupal/Core/Asset/AttachedAssets.php, line 52

Class

AttachedAssets
The default attached assets collection.

Namespace

Drupal\Core\Asset

Code

public function setLibraries(array $libraries) {
    $this->libraries = array_unique($libraries);
    return $this;
}

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