AttachmentsInterface::setAttachments

public AttachmentsInterface::setAttachments(array $attachments) Sets attachments. Parameters array $attachments: The attachments to set. Return value $this File core/lib/Drupal/Core/Render/AttachmentsInterface.php, line 42 Class AttachmentsInterface Defines an interface for responses that can expose #attached metadata. Namespace Drupal\Core\Render Code public function setAttachments(array $attachments);

AttachmentsResponseProcessorInterface::processAttachments

public AttachmentsResponseProcessorInterface::processAttachments(AttachmentsInterface $response) Processes the attachments of a response that has attachments. Libraries, JavaScript settings, feeds, HTML <head> tags, HTML <head> links, HTTP headers, and the HTTP status code are attached to render arrays using the #attached property. The #attached property is an associative array, where the keys are the attachment types and the values are the attached data. For example: $build['#attac

AttachmentsInterface

Defines an interface for responses that can expose #attached metadata. @todo If in Drupal 9, we remove attachments other than assets (libraries + drupalSettings), then we can look into unifying this with \Drupal\Core\Asset\AttachedAssetsInterface. Hierarchy interface \Drupal\Core\Render\AttachmentsInterface See also \Drupal\Core\Render\AttachmentsTrait File core/lib/Drupal/Core/Render/AttachmentsInterface.php, line 14 Namespace Drupal\Core\Render Members Name Modifiers Type Des

AttachedAssetsInterface::setLibraries

public AttachedAssetsInterface::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 File core/lib/Drupal/Core/Asset/AttachedAssetsInterface.php, line 38 Class AttachedAssetsInterface The attached assets collection for the current response. Namespace Drupal\Core\Asset Code public function setLibraries(array $libraries);

AttachedAssetsInterface::getLibraries

public AttachedAssetsInterface::getLibraries() Returns the asset libraries attached to the current response. Return value string[] File core/lib/Drupal/Core/Asset/AttachedAssetsInterface.php, line 45 Class AttachedAssetsInterface The attached assets collection for the current response. Namespace Drupal\Core\Asset Code public function getLibraries();

AttachedAssetsInterface::getSettings

public AttachedAssetsInterface::getSettings() Returns the settings attached to the current response. Return value array File core/lib/Drupal/Core/Asset/AttachedAssetsInterface.php, line 62 Class AttachedAssetsInterface The attached assets collection for the current response. Namespace Drupal\Core\Asset Code public function getSettings();

AttachedAssetsInterface::setSettings

public AttachedAssetsInterface::setSettings(array $settings) Sets the JavaScript settings that are attached to the current response. Parameters array $settings: The needed JavaScript settings. Return value $this File core/lib/Drupal/Core/Asset/AttachedAssetsInterface.php, line 55 Class AttachedAssetsInterface The attached assets collection for the current response. Namespace Drupal\Core\Asset Code public function setSettings(array $settings);

AttachedAssetsInterface::setAlreadyLoadedLibraries

public AttachedAssetsInterface::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 File core/lib/Drupal/Core/Asset/AttachedAssetsInterface.php, line 72 Class AttachedAssetsInterface The attached assets collection for the current response. Namespace Drupal\Core\Asset Code public function setAlreadyLoadedLibraries(array $libraries)

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

AttachedAssetsInterface::getAlreadyLoadedLibraries

public AttachedAssetsInterface::getAlreadyLoadedLibraries() Returns the set of already loaded asset libraries. Return value string[] File core/lib/Drupal/Core/Asset/AttachedAssetsInterface.php, line 79 Class AttachedAssetsInterface The attached assets collection for the current response. Namespace Drupal\Core\Asset Code public function getAlreadyLoadedLibraries();