You are here

function template_preprocess_images_jssor_formatter in Jssor Slider 8

Prepares variables for container templates.

Default template: images-jssor-formatter.html.twig.

Parameters

array $variables: An associative array containing:

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

File

./jssor.theme.inc, line 265
Preprocessors and helper functions to make theming easier.

Code

function template_preprocess_images_jssor_formatter(&$variables) {
  $element = $variables['element'];

  // Ensure #attributes is set.
  $element += array(
    '#attributes' => array(),
  );
  $settings = $element['#settings'];
  $variables['arrownavigator'] = $settings['arrownavigator'];
  $variables['bulletnavigator'] = $settings['bulletnavigator'];
  $variables['children'] = $element['#children'];
  $variables['attributes'] = $element['#attributes'];
}