public function RenderStack::drupal_process_attached in Render cache 7.2
Helper function to add any #attached assets to the recursion storage.
Parameters
$elements: The structured array describing the data being rendered.
$group: The default group of JavaScript and CSS being added. This is only applied to the stylesheets and JavaScript items that don't have an explicit group assigned to them.
$dependency_check: When TRUE, will exit if a given library's dependencies are missing. When set to FALSE, will continue to add the libraries, even though one or more dependencies are missing. Defaults to FALSE.
$every_page: Set to TRUE to indicate that the attachments are added to every page on the site. Only attachments with the every_page flag set to TRUE can participate in JavaScript/CSS aggregation.
Return value
FALSE if there were any missing library dependencies; TRUE if all library dependencies were met.
See also
File
- src/
Cache/ RenderStack.php, line 481 - Contains \Drupal\render_cache\Cache\RenderStack
Class
- RenderStack
- Defines the RenderStack service.
Namespace
Drupal\render_cache\CacheCode
public function drupal_process_attached($elements, $group = 0, $dependency_check = FALSE, $every_page = NULL) {
if ($this
->isRecursive()) {
$storage = array();
$storage['#attached'] = $elements['#attached'];
$this
->addRecursionStorage($storage, TRUE);
// @todo Figure out at runtime if library dependencies are met.
return TRUE;
}
return $this
->callOriginalFunction("drupal_process_attached", $elements, $group, $dependency_check, $every_page);
}