You are here

public function JuiceboxGalleryInterface::updateImage in Juicebox HTML5 Responsive Image Galleries 8.2

Same name and namespace in other branches
  1. 8.3 src/JuiceboxGalleryInterface.php \Drupal\juicebox\JuiceboxGalleryInterface::updateImage()

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 convenience.

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.

bool $filter: Optional. Whether-or-not to filter the $title and $caption values for syntactic compatibility with Juicebox.

Return value

bool Returns TRUE on successful update and FALSE on failure.

1 method overrides JuiceboxGalleryInterface::updateImage()
JuiceboxGallery::updateImage in src/JuiceboxGallery.php
Update an existing image in the gallery.

File

src/JuiceboxGalleryInterface.php, line 99

Class

JuiceboxGalleryInterface
Interface definition for a Juicebox gallery.

Namespace

Drupal\juicebox

Code

public function updateImage($image_id, array $src_data = [], $title = '', $caption = '', $filter = TRUE);