You are here

pm_time_tracking.page.inc in Drupal PM (Project Management) 4.x

Contains pm_time_tracking.page.inc.

Page callback for Time tracking entities.

File

modules/pm_timetracking/pm_time_tracking.page.inc
View source
<?php

/**
 * @file
 * Contains pm_time_tracking.page.inc.
 *
 * Page callback for Time tracking entities.
 */
use Drupal\Core\Render\Element;

/**
 * Prepares variables for Time tracking templates.
 *
 * Default template: pm_time_tracking.html.twig.
 *
 * @param array $variables
 *   An associative array containing:
 *   - elements: An associative array containing the user information and any
 *   - attributes: HTML attributes for the containing element.
 */
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];
  }
}

Functions

Namesort descending Description
template_preprocess_pm_time_tracking Prepares variables for Time tracking templates.