You are here

function template_preprocess_pm_epic in Drupal PM (Project Management) 4.x

Prepares variables for Epic templates.

Default template: pm_epic.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_epic/pm_epic.page.inc, line 22
Contains pm_epic.page.inc.

Code

function template_preprocess_pm_epic(array &$variables) {

  // Fetch Epic Entity Object.
  $pm_epic = $variables['elements']['#pm_epic'];

  // Helpful $content variable for templates.
  foreach (Element::children($variables['elements']) as $key) {
    $variables['content'][$key] = $variables['elements'][$key];
  }
}