public function JuiceboxGalleryInterface::addImage in Juicebox HTML5 Responsive Image Galleries 7.2
Add a new image to the gallery.
Parameters
array $src_data: Associative array containing all attributes needed to define a gallery image. camelCase attribute keys are preferred but underscore-separated (e.g., image_url) and dash-separated (e.g., image-url) values are also accepted when 'process_attributes' legacy support is active (i.e. when the 'process_attributes' setting was activated when the gallery was instantiated). This includes:
- imageURL (Required): URL to the full image to display.
- thumbURL (Required): URL to the thumbnail to display for the image.
- linkURL: The Juicebox "link URL" value for the image.
- linkTarget: 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_markup: Optional. Whether-or-not to filter the $title and $caption values for syntactic compatibility with Juicebox. This setting applies to this specific image. If NULL the gallery-wide setting specified when the XML is generated will be used (see the renderXML()). This filter is not actually applied until the XML is rendered.
int $override_id: Optional. The id of an existing image, already added to the gallery, to override with new data. If NULL the image will simply be added. This id should match the index for the image as returned by getImages(). Not compatible with $offset.
int $offset: Optional. If offset is positive then the image is inserted at that offset from the beginning of the existing image list. If offset is negative then the image is inserted that far from the end of the image list. Not compatible with $override_id.
Return value
boolean Returns TRUE on successful addition and FALSE on failure.
2 methods override JuiceboxGalleryInterface::addImage()
- JuiceboxGallery::addImage in includes/
JuiceboxGallery.inc - Add a new image to the gallery.
- JuiceboxGalleryDecorator::addImage in includes/
JuiceboxGalleryDecorator.inc - Add a new image to the gallery.
File
- includes/
JuiceboxGalleryInterface.inc, line 73 - Interface definition for a Juicebox gallery.
Class
- JuiceboxGalleryInterface
- Interface definition for a Juicebox gallery.
Code
public function addImage($src_data = array(), $title = '', $caption = '', $filter_markup = NULL, $override_id = NULL, $offset = NULL);