public static BubbleableMetadata::createFromRenderArray(array $build)
Creates a bubbleable metadata object with values taken from a render array.
array $build: A render array.
static
Overrides CacheableMetadata::createFromRenderArray
public static function createFromRenderArray(array $build) { $meta = parent::createFromRenderArray($build); $meta->attachments = (isset($build['#attached'])) ? $build['#attached'] : []; return $meta; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!BubbleableMetadata.php/function/BubbleableMetadata::createFromRenderArray/8.1.x