31 lines
814 B
PHP
31 lines
814 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* @file
|
||
|
* Contains oc_organisation.page.inc.
|
||
|
*
|
||
|
* Page callback for Organisation entities.
|
||
|
*/
|
||
|
|
||
|
use Drupal\Core\Render\Element;
|
||
|
|
||
|
/**
|
||
|
* Prepares variables for Organisation templates.
|
||
|
*
|
||
|
* Default template: oc_organisation.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_oc_organisation(array &$variables) {
|
||
|
// Fetch OCOrganisation Entity Object.
|
||
|
$oc_organisation = $variables['elements']['#oc_organisation'];
|
||
|
|
||
|
// Helpful $content variable for templates.
|
||
|
foreach (Element::children($variables['elements']) as $key) {
|
||
|
$variables['content'][$key] = $variables['elements'][$key];
|
||
|
}
|
||
|
}
|