pm_sub_task.page.inc in Drupal PM (Project Management) 4.x
Contains pm_sub_task.page.inc.
Page callback for Sub task entities.
File
modules/pm_sub_task/pm_sub_task.page.incView source
<?php
/**
 * @file
 * Contains pm_sub_task.page.inc.
 *
 * Page callback for Sub task entities.
 */
use Drupal\Core\Render\Element;
/**
 * Prepares variables for Sub task templates.
 *
 * Default template: pm_sub_task.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_sub_task(array &$variables) {
  // Fetch SubTask Entity Object.
  $pm_sub_task = $variables['elements']['#pm_sub_task'];
  // Helpful $content variable for templates.
  foreach (Element::children($variables['elements']) as $key) {
    $variables['content'][$key] = $variables['elements'][$key];
  }
}Functions
| 
            Name | 
                  Description | 
|---|---|
| template_preprocess_pm_sub_task | Prepares variables for Sub task templates. |