You are here

public function BubbleableMetadata::applyTo in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Render/BubbleableMetadata.php \Drupal\Core\Render\BubbleableMetadata::applyTo()

Applies the values of this bubbleable metadata object to a render array.

Parameters

array &$build: A render array.

Overrides CacheableMetadata::applyTo

File

core/lib/Drupal/Core/Render/BubbleableMetadata.php, line 57
Contains \Drupal\Core\Render\BubbleableMetadata.

Class

BubbleableMetadata
Value object used for bubbleable rendering metadata.

Namespace

Drupal\Core\Render

Code

public function applyTo(array &$build) {
  parent::applyTo($build);
  $build['#attached'] = $this->attachments;
}