function AttachmentsTrait::setAttachments

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Render/AttachmentsTrait.php \Drupal\Core\Render\AttachmentsTrait::setAttachments()
  2. 10 core/lib/Drupal/Core/Render/AttachmentsTrait.php \Drupal\Core\Render\AttachmentsTrait::setAttachments()
  3. 8.9.x core/lib/Drupal/Core/Render/AttachmentsTrait.php \Drupal\Core\Render\AttachmentsTrait::setAttachments()

File

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

Class

AttachmentsTrait
Provides an implementation of AttachmentsInterface.

Namespace

Drupal\Core\Render

Code

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

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