Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AttachmentsTrait.php

function AttachmentsTrait::addAttachments

2 calls to AttachmentsTrait::addAttachments()
BubbleableMetadata::addCacheableDependency in core/lib/Drupal/Core/Render/BubbleableMetadata.php
FilterProcessResult::createPlaceholder in core/modules/filter/src/FilterProcessResult.php
Creates a placeholder.

File

core/lib/Drupal/Core/Render/AttachmentsTrait.php, line 29

Class

AttachmentsTrait
Provides an implementation of AttachmentsInterface.

Namespace

Drupal\Core\Render

Code

public function addAttachments(array $attachments) {
    $this->attachments = BubbleableMetadata::mergeAttachments($this->attachments, $attachments);
    return $this;
}
RSS feed
Powered by Drupal