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