You are here

public function AttachmentsTrait::setAttachments in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Render/AttachmentsTrait.php \Drupal\Core\Render\AttachmentsTrait::setAttachments()
2 calls to AttachmentsTrait::setAttachments()
AjaxResponse::addCommand in core/lib/Drupal/Core/Ajax/AjaxResponse.php
Add an AJAX command to the response.
HtmlResponse::setContent in core/lib/Drupal/Core/Render/HtmlResponse.php
Sets the response content.

File

core/lib/Drupal/Core/Render/AttachmentsTrait.php, line 42
Contains \Drupal\Core\Render\AttachmentsTrait.

Class

AttachmentsTrait
Provides an implementation of AttachmentsInterface.

Namespace

Drupal\Core\Render

Code

public function setAttachments(array $attachments) {
  $this->attachments = $attachments;
  return $this;
}