public function JuiceboxGallery::getImages in Juicebox HTML5 Responsive Image Galleries 7.2
Getter method for the gallery images.
Parameters
boolean $filtered: If TRUE any output processing that is specified in the settings will be applied to the returned data (matching the processing that would happen upon rendering the XML). If FALSE the image data is returned in a raw format that matches what was input directly via addImage() or similar.
Return value
array Returns an array of images currently in the gallery.
Overrides JuiceboxGalleryInterface::getImages
1 call to JuiceboxGallery::getImages()
- JuiceboxGallery::renderXml in includes/
JuiceboxGallery.inc - Render the XML for a Juicebox gallery once images and options have been added.
File
- includes/
JuiceboxGallery.inc, line 122 - A php-only set of methods to create the script and markup components of a Juicebox gallery.
Class
- JuiceboxGallery
- Class to generate the script and markup for a Juicebox gallery.
Code
public function getImages($filtered = FALSE) {
$images = $this->images;
// If we are not returning the raw input data we need to apply any output
// processing that may be specified in the object configuration.
if ($filtered) {
foreach ($images as &$image) {
$image['title'] = !empty($this->settings['filter_markup']) ? $this
->filterMarkup($image['title']) : $image['title'];
$image['caption'] = !empty($this->settings['filter_markup']) ? $this
->filterMarkup($image['caption']) : $image['caption'];
$image['src_data'] = !empty($this->settings['process_attributes']) ? $this
->processAttributes($image['src_data']) : $image['src_data'];
// Also derive linkURL and linkTarget values if they are not explicitly
// set.
if (!isset($image['src_data']['linkURL'])) {
$image['src_data']['linkURL'] = $image['src_data']['imageURL'];
}
if (!isset($image['src_data']['linkTarget'])) {
$image['src_data']['linkTarget'] = '_blank';
}
}
}
return $images;
}