private function BlazyManager::setAttachments in Blazy 7
Provides attachment and cache for both theme_field() and theme_item_list().
2 calls to BlazyManager::setAttachments()
- BlazyManager::build in src/
BlazyManager.php - Returns the entire contents using theme_field(), or theme_item_list().
- BlazyManager::preRenderBuild in src/
BlazyManager.php - Builds the Blazy outputs as a structured array ready for ::renderer().
File
- src/
BlazyManager.php, line 424
Class
- BlazyManager
- Implements a public facing blazy manager.
Namespace
Drupal\blazyCode
private function setAttachments(array &$element, array $settings) {
$attachments = $this
->attach($settings);
$element['#attached'] = empty($element['#attached']) ? $attachments : NestedArray::mergeDeep($element['#attached'], $attachments);
}