You are here

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

Contains pm_feature.page.inc.

Page callback for Feature entities.

File

modules/pm_feature/pm_feature.page.inc
View source
<?php

/**
 * @file
 * Contains pm_feature.page.inc.
 *
 * Page callback for Feature entities.
 */
use Drupal\Core\Render\Element;

/**
 * Prepares variables for Feature templates.
 *
 * Default template: pm_feature.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_feature(array &$variables) {

  // Fetch Feature Entity Object.
  $pm_feature = $variables['elements']['#pm_feature'];

  // 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_feature Prepares variables for Feature templates.