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