function template_preprocess_photoswipe_image_formatter in PhotoSwipe 3.x
Same name and namespace in other branches
- 8.2 photoswipe.theme.inc \template_preprocess_photoswipe_image_formatter()
- 8 photoswipe.theme.inc \template_preprocess_photoswipe_image_formatter()
Prepares variables for a Photoswipe image field formatter.
Parameters
array $variables: An associative array containing:
- item: An ImageItem object.
- display_settings: optional image styles.
File
- ./
photoswipe.theme.inc, line 21 - Photoswipe theme preprocess functions.
Code
function template_preprocess_photoswipe_image_formatter(array &$variables) {
\Drupal::service('class_resolver')
->getInstanceFromDefinition(PhotoswipePreprocessProcessor::class)
->preprocess($variables);
}