You are here

function template_preprocess_merci_line_item in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2

Prepares variables for Merci Line Item templates.

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

modules/merci_line_item/merci_line_item.page.inc, line 22
Contains merci_line_item.page.inc.

Code

function template_preprocess_merci_line_item(array &$variables) {

  // Fetch MerciLineItem Entity Object.
  $merci_line_item = $variables['elements']['#merci_line_item'];

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