function AttachmentsInterface::setAttachments

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

Replaces this object's attached data with the provided array.

Parameters

array $attachments: The attachments to set.

Return value

$this

File

core/lib/Drupal/Core/Render/AttachmentsInterface.php, line 66

Class

AttachmentsInterface
The attached metadata collection for a renderable element.

Namespace

Drupal\Core\Render

Code

public function setAttachments(array $attachments);

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