You are here

function template_preprocess_paragraph_set in Paragraphs frontend ui 8

Prepares variables for Paragraph set templates.

Default template: paragraph_set.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

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

Code

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];
  }
}