You are here

function template_preprocess_webform_horizontal_rule in Webform 6.x

Same name and namespace in other branches
  1. 8.5 includes/webform.theme.template.inc \template_preprocess_webform_horizontal_rule()

Prepares variables for webform horizontal rule templates.

Default template: webform-horizontal-rule.html.twig.

Parameters

array $variables: An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #id, #attributes.

File

includes/webform.theme.template.inc, line 692
Preprocessors and helper functions to make theming easier.

Code

function template_preprocess_webform_horizontal_rule(array &$variables) {
  $element = $variables['element'];
  if (!empty($element['#id'])) {
    $variables['attributes']['id'] = $element['#id'];
  }
}