AttachedAssetsInterface

The attached assets collection for the current response. Allows for storage of: an ordered list of asset libraries (to be loaded for the current response) attached JavaScript settings (to be loaded for the current response) a set of asset libraries that the client already has loaded (as indicated in the request, to *not* be loaded for the current response) Hierarchy interface \Drupal\Core\Asset\AttachedAssetsInterface See also \Drupal\Core\Asset\AssetResolverInterface File core/lib/Drupal

AttachedAssets::setSettings

public AttachedAssets::setSettings(array $settings) Sets the JavaScript settings that are attached to the current response. Parameters array $settings: The needed JavaScript settings. Return value $this Overrides AttachedAssetsInterface::setSettings File core/lib/Drupal/Core/Asset/AttachedAssets.php, line 67 Class AttachedAssets The default attached assets collection. Namespace Drupal\Core\Asset Code public function setSettings(array $settings) { $this->settings = $settings; r

AttachedAssets::setLibraries

public AttachedAssets::setLibraries(array $libraries) Sets the asset libraries attached to the current response. Parameters string[] $libraries: A list of libraries, in the order they should be loaded. Return value $this 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->libr

AttachedAssets::setAlreadyLoadedLibraries

public AttachedAssets::setAlreadyLoadedLibraries(array $libraries) Sets the asset libraries that the current request marked as already loaded. Parameters string[] $libraries: The set of already loaded libraries. Return value $this Overrides AttachedAssetsInterface::setAlreadyLoadedLibraries File core/lib/Drupal/Core/Asset/AttachedAssets.php, line 89 Class AttachedAssets The default attached assets collection. Namespace Drupal\Core\Asset Code public function setAlreadyLoadedLibraries(

AttachedAssets::getSettings

public AttachedAssets::getSettings() Returns the settings attached to the current response. Return value array Overrides AttachedAssetsInterface::getSettings File core/lib/Drupal/Core/Asset/AttachedAssets.php, line 75 Class AttachedAssets The default attached assets collection. Namespace Drupal\Core\Asset Code public function getSettings() { return $this->settings; }

AttachedAssets::getLibraries

public AttachedAssets::getLibraries() Returns the asset libraries attached to the current response. Return value string[] Overrides AttachedAssetsInterface::getLibraries File core/lib/Drupal/Core/Asset/AttachedAssets.php, line 60 Class AttachedAssets The default attached assets collection. Namespace Drupal\Core\Asset Code public function getLibraries() { return $this->libraries; }

AttachedAssets::getAlreadyLoadedLibraries

public AttachedAssets::getAlreadyLoadedLibraries() Returns the set of already loaded asset libraries. Return value string[] Overrides AttachedAssetsInterface::getAlreadyLoadedLibraries File core/lib/Drupal/Core/Asset/AttachedAssets.php, line 82 Class AttachedAssets The default attached assets collection. Namespace Drupal\Core\Asset Code public function getAlreadyLoadedLibraries() { return $this->alreadyLoadedLibraries; }

AttachedAssets::createFromRenderArray

public static AttachedAssets::createFromRenderArray(array $render_array) Creates an AttachedAssetsInterface object from a render array. Parameters array $render_array: A render array. Return value \Drupal\Core\Asset\AttachedAssetsInterface Throws \LogicException Overrides AttachedAssetsInterface::createFromRenderArray File core/lib/Drupal/Core/Asset/AttachedAssets.php, line 34 Class AttachedAssets The default attached assets collection. Namespace Drupal\Core\Asset Code public static

AttachedAssets::$settings

The JavaScript settings attached to the current response. Type: array File core/lib/Drupal/Core/Asset/AttachedAssets.php, line 22 Class AttachedAssets The default attached assets collection. Namespace Drupal\Core\Asset Code public $settings = [];

AttachedAssets::$libraries

The (ordered) list of asset libraries attached to the current response. Type: string[] File core/lib/Drupal/Core/Asset/AttachedAssets.php, line 15 Class AttachedAssets The default attached assets collection. Namespace Drupal\Core\Asset Code public $libraries = [];