function template_preprocess_site_setting_entity in Site Settings and Labels 8
Prepares variables for Site Setting templates.
Default template: site_setting_entity.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
- ./
site_setting_entity.page.inc, line 24 - Contains site_setting_entity.page.inc.
Code
function template_preprocess_site_setting_entity(array &$variables) {
// Fetch SiteSettingEntity Entity Object.
$site_setting_entity = $variables['elements']['#site_setting_entity'];
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
}