You are here

function template_preprocess_photoswipe_responsive_image_formatter in PhotoSwipe 3.x

Prepares variables for a Photoswipe responsive image field formatter.

Parameters

array $variables: An associative array containing:

  • item: An ImageItem object.
  • display_settings: optional image styles.

File

./photoswipe.theme.inc, line 37
Photoswipe theme preprocess functions.

Code

function template_preprocess_photoswipe_responsive_image_formatter(array &$variables) {
  \Drupal::service('class_resolver')
    ->getInstanceFromDefinition(PhotoswipeResponsivePreprocessProcessor::class)
    ->preprocess($variables);
}