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/zencrm_entities/activity.page.inc

31 lines
765 B
PHP
Raw Normal View History

2018-04-14 10:26:09 +00:00
<?php
/**
* @file
* Contains activity.page.inc.
*
* Page callback for Activity entities.
*/
use Drupal\Core\Render\Element;
/**
* Prepares variables for Activity templates.
*
* Default template: activity.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_activity(array &$variables) {
// Fetch Activity Entity Object.
$activity = $variables['elements']['#activity'];
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
}