need to run : drush ev 'drupal_flush_all_caches();' drush cr and restart nginx and php-fpm before loading the website
31 lines
757 B
PHP
31 lines
757 B
PHP
<?php
|
|
|
|
/**
|
|
* @file
|
|
* Contains chutier.page.inc.
|
|
*
|
|
* Page callback for Chutier entities.
|
|
*/
|
|
|
|
use Drupal\Core\Render\Element;
|
|
|
|
/**
|
|
* Prepares variables for Chutier templates.
|
|
*
|
|
* Default template: chutier.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_chutier(array &$variables) {
|
|
// Fetch Chutier Entity Object.
|
|
$chutier = $variables['elements']['#chutier'];
|
|
|
|
// Helpful $content variable for templates.
|
|
foreach (Element::children($variables['elements']) as $key) {
|
|
$variables['content'][$key] = $variables['elements'][$key];
|
|
}
|
|
}
|