pm_note.page.inc in Drupal PM (Project Management) 4.x
Contains pm_note.page.inc.
Page callback for Note entities.
File
modules/pm_note/pm_note.page.incView source
<?php
/**
* @file
* Contains pm_note.page.inc.
*
* Page callback for Note entities.
*/
use Drupal\Core\Render\Element;
/**
* Prepares variables for Note templates.
*
* Default template: pm_note.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_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];
}
}
Functions
Name | Description |
---|---|
template_preprocess_pm_note | Prepares variables for Note templates. |