You are here

paragraph_set.page.inc in Paragraphs frontend ui 8

Contains paragraph_set.page.inc.

Page callback for Paragraph set entities.

File

paragraph_set.page.inc
View source
<?php

/**
 * @file
 * Contains paragraph_set.page.inc.
 *
 * Page callback for Paragraph set entities.
 */
use Drupal\Core\Render\Element;

/**
 * Prepares variables for Paragraph set templates.
 *
 * Default template: paragraph_set.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_paragraph_set(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_paragraph_set Prepares variables for Paragraph set templates.