__chutier.page.inc 757 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @file
  4. * Contains chutier.page.inc.
  5. *
  6. * Page callback for Chutier entities.
  7. */
  8. use Drupal\Core\Render\Element;
  9. /**
  10. * Prepares variables for Chutier templates.
  11. *
  12. * Default template: chutier.html.twig.
  13. *
  14. * @param array $variables
  15. * An associative array containing:
  16. * - elements: An associative array containing the user information and any
  17. * - attributes: HTML attributes for the containing element.
  18. */
  19. function template_preprocess_chutier(array &$variables) {
  20. // Fetch Chutier Entity Object.
  21. $chutier = $variables['elements']['#chutier'];
  22. // Helpful $content variable for templates.
  23. foreach (Element::children($variables['elements']) as $key) {
  24. $variables['content'][$key] = $variables['elements'][$key];
  25. }
  26. }