You are here

flipping_book.page.inc in Flipping Book 8

Contains flipping_book.page.inc.

Page callback for Flipping Book entities.

File

flipping_book.page.inc
View source
<?php

/**
 * @file
 * Contains flipping_book.page.inc.
 *
 * Page callback for Flipping Book entities.
 */
use Drupal\Core\Render\Element;

/**
 * Prepares variables for Flipping Book templates.
 *
 * Default template: flipping_book.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_flipping_book(array &$variables) {

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

Functions

Namesort descending Description
template_preprocess_flipping_book Prepares variables for Flipping Book templates.