public function JuiceboxGallery::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/
JuiceboxGallery.inc, line 113 - 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 updateImage($image_id, $src_data = array(), $title = '', $caption = '', $filter = TRUE) {
// Updating can be accomplished with addImage(), so just pass-through the
// needed params.
return $this
->addImage($src_data, $title, $caption, $filter, $image_id);
}