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_reporting/opencase_report.page.inc
2018-09-17 17:29:04 +01:00

31 lines
820 B
PHP

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