You are here

function template_preprocess_opigno_module in Opigno module 3.x

Same name and namespace in other branches
  1. 8 opigno_module.theme.inc \template_preprocess_opigno_module()

Prepares variables for Module templates.

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

./opigno_module.theme.inc, line 40
Contains opigno_module.theme.inc.

Code

function template_preprocess_opigno_module(array &$variables) {

  // Fetch OpignoModule Entity Object.
  $opigno_module = $variables['elements']['#opigno_module'];

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