You are here

public function ArrayObject::setAttachments in Express 8

Sets attachments.

Parameters

array $attachments: The attachments to set.

Return value

$this

Overrides AttachmentsInterface::setAttachments

File

themes/contrib/bootstrap/src/Utility/ArrayObject.php, line 364
Contains \Drupal\bootstrap\Utility\ArrayObject.

Class

ArrayObject
Custom ArrayObject implementation.

Namespace

Drupal\bootstrap\Utility

Code

public function setAttachments(array $attachments) {
  BubbleableMetadata::createFromRenderArray($this->array)
    ->setAttachments($attachments)
    ->applyTo($this->array);
  return $this;
}