You are here

schedule.page.inc in Business Rules 2.x

Same filename and directory in other branches
  1. 8 schedule.page.inc

Contains schedule.page.inc.

Page callback for Schedule entities.

File

schedule.page.inc
View source
<?php

/**
 * @file
 * Contains schedule.page.inc.
 *
 * Page callback for Schedule entities.
 */
use Drupal\Core\Render\Element;

/**
 * Prepares variables for Schedule templates.
 *
 * Default template: schedule.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_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];
  }
}

Functions

Namesort descending Description
template_preprocess_schedule Prepares variables for Schedule templates.