function template_preprocess_user_module_status in Opigno module 8
Same name and namespace in other branches
- 3.x user_module_status.page.inc \template_preprocess_user_module_status()
Prepares variables for User module status templates.
Default template: user_module_status.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
- ./
user_module_status.page.inc, line 22 - Contains user_module_status.page.inc.
Code
function template_preprocess_user_module_status(array &$variables) {
// Fetch UserModuleStatus Entity Object.
$user_module_status = $variables['elements']['#user_module_status'];
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
}