function template_preprocess_pm_time_tracking in Drupal PM (Project Management) 4.x
Prepares variables for Time tracking templates.
Default template: pm_time_tracking.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
- modules/
pm_timetracking/ pm_time_tracking.page.inc, line 22 - Contains pm_time_tracking.page.inc.
Code
function template_preprocess_pm_time_tracking(array &$variables) {
// Fetch TimeTracking Entity Object.
$pm_time_tracking = $variables['elements']['#pm_time_tracking'];
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
}