This repository has been archived on 2022-07-12. You can view files and clone it, but cannot push or open issues or pull requests.
opencase/modules/opencase_entities/oc_organisation.page.inc

31 lines
814 B
PHP
Raw Normal View History

2020-11-12 17:13:28 +00:00
<?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];
}
}