public function JuiceboxGalleryDecorator::updateImage in Juicebox HTML5 Responsive Image Galleries 7.2
Update an existing image in the gallery. This duplicates the functionality of addImage() with an $override_id but is included as a separate method for convienence.
Parameters
int $image_id: The id of an existing image, already added to the gallery, to update with new data. This id should match the index for the image as returned by getImages().
array $src_data: Associative array containing all the source data for a gallery image, including the:
- image_url: URL to the full image to display.
- thumb_url: URL to the thumbnail to display for the image.
- link_url: The Juicebox "link URL" value for the image.
- link_target: The browser target value to use when following a link URL.
string $title: The title markup to display for the image.
string $caption: The caption markup to display for the image.
boolean $filter: Optional. Whether-or-not to filter the $title and $caption values for syntactic compatibility with Juicebox.
Return value
boolean Returns TRUE on successful update and FALSE on failure.
Overrides JuiceboxGalleryInterface::updateImage
File
- includes/
JuiceboxGalleryDecorator.inc, line 59 - Base decorator class for a Juicebox Gallery.
Class
- JuiceboxGalleryDecorator
- Base decorator class for a Juicebox Gallery.
Code
public function updateImage($image_id, $src_data = array(), $title = '', $caption = '', $filter = TRUE) {
return $this->gallery
->updateImage($image_id, $src_data, $title, $caption, $filter);
}