public function JuiceboxGallery::removeImage in Juicebox HTML5 Responsive Image Galleries 8.2
Same name and namespace in other branches
- 8.3 src/JuiceboxGallery.php \Drupal\juicebox\JuiceboxGallery::removeImage()
Remove an image from the gallery.
Parameters
int $id: The id of an existing image that was already added to the gallery. This id should match the index for the image as returned by getImages().
Return value
bool Returns TRUE on successful removal and FALSE on failure.
Overrides JuiceboxGalleryInterface::removeImage
File
- src/
JuiceboxGallery.php, line 162
Class
- JuiceboxGallery
- Class to generate the script and markup for a Juicebox gallery.
Namespace
Drupal\juiceboxCode
public function removeImage($id) {
if (!empty($this->images[$id])) {
unset($this->images[$id]);
return TRUE;
}
return FALSE;
}