function template_preprocess_scheduled_update in Scheduled Updates 8
Prepares variables for Scheduled update templates.
Default template: scheduled_update.html.twig.
Parameters
array $variables: An associative array containing:
- elements: An associative array containing the user information and any
- attributes: HTML attributes for the containing element.
File
- ./
scheduled_update.page.inc, line 24 - Contains scheduled_update.page.inc..
Code
function template_preprocess_scheduled_update(array &$variables) {
// Fetch ScheduledUpdate Entity Object.
$scheduled_update = $variables['elements']['#scheduled_update'];
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
}