You are here

public static function RangeSlider::preRenderRange in Range Slider 8

Prepares a #type 'range' render element for input.html.twig.

Parameters

array $element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #min, #max, #attributes, #step.

Return value

array The $element with prepared variables ready for input.html.twig.

Overrides Range::preRenderRange

File

src/Element/RangeSlider.php, line 55

Class

RangeSlider
Provides a slider for input of a number within a specific range.

Namespace

Drupal\range_slider\Element

Code

public static function preRenderRange($element) {
  $element = parent::preRenderRange($element);
  Element::setAttributes($element, [
    'data-orientation',
  ]);
  return $element;
}