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