You are here

function template_preprocess_schedule in Business Rules 8

Same name and namespace in other branches
  1. 2.x schedule.page.inc \template_preprocess_schedule()

Prepares variables for Schedule templates.

Default template: schedule.html.twig.

Parameters

array $variables: An associative array containing:

  • elements: An associative array containing the user information and any
  • attributes: HTML attributes for the containing element.

File

./schedule.page.inc, line 22
Contains schedule.page.inc.

Code

function template_preprocess_schedule(array &$variables) {

  // Fetch Schedule Entity Object.
  $schedule = $variables['elements']['#schedule'];

  // Helpful $content variable for templates.
  foreach (Element::children($variables['elements']) as $key) {
    $variables['content'][$key] = $variables['elements'][$key];
  }
}