public function JuiceboxFormatterInterface::styleImageSrcData in Juicebox HTML5 Responsive Image Galleries 8.2
Same name and namespace in other branches
- 8.3 src/JuiceboxFormatterInterface.php \Drupal\juicebox\JuiceboxFormatterInterface::styleImageSrcData()
Utility to extract image source data.
Extract in an array structure that can be used when adding a new image to the gallery.
Parameters
Drupal\file\FileInterface $image_file: A file entity representing the main image.
string $image_style: The Drupal image style to apply to the main image.
Drupal\file\FileInterface $thumb_file: A file entity representing the thumbnail image.
string $thumb_style: The Drupal image style to apply to the thumbnail image.
array $settings: An associative array of gallery-specific settings.
Return value
array An associative array of image source URLs that's ready to be added to a Juicebox gallery, including:
- imageURL: URL to the full image to display.
- thumbURL: URL to the thumbnail to display for the image.
- linkURL: The Juicebox "link URL" value for the image.
- linkTarget: The browser target value to use when following a link URL.
- juicebox_compatible: Boolean indicating if the raw source file for the main image is directly compatible with the Juicebox library.
1 method overrides JuiceboxFormatterInterface::styleImageSrcData()
- JuiceboxFormatter::styleImageSrcData in src/
JuiceboxFormatter.php - Utility to extract image source data.
File
- src/
JuiceboxFormatterInterface.php, line 96
Class
- JuiceboxFormatterInterface
- Interface definition for a Juicebox Formatter service.
Namespace
Drupal\juiceboxCode
public function styleImageSrcData(FileInterface $image_file, $image_style, FileInterface $thumb_file, $thumb_style, array $settings);