You are here

public function JuiceboxGalleryDecorator::addOption in Juicebox HTML5 Responsive Image Galleries 7.2

Add a new Juicebox configuration option to the gallery.

Parameters

string $option_name: The option name/key to add. camelCase names keys are preferred but underscore-separated (e.g., my_setting) and dash-separated (e.g., my-seting) 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).

string $option_value: The option value to add.

boolean $override: Whether-or-not to override any values that already exist for the passed name/key.

Return value

boolean Returns TRUE on successful addition and FALSE on failure.

Overrides JuiceboxGalleryInterface::addOption

2 calls to JuiceboxGalleryDecorator::addOption()
JuiceboxGalleryDrupal::runCommonBuild in includes/JuiceboxGalleryDrupal.inc
Common post-build tasks that should take place whenever a gallery of any type/source is built.
JuiceboxGalleryDrupal::setGalleryOptions in includes/JuiceboxGalleryDrupal.inc
Utility to extract Juicebox options from the common Drupal display settings, and add them to the gallery.

File

includes/JuiceboxGalleryDecorator.inc, line 80
Base decorator class for a Juicebox Gallery.

Class

JuiceboxGalleryDecorator
Base decorator class for a Juicebox Gallery.

Code

public function addOption($option_name, $option_value, $override = TRUE) {
  return $this->gallery
    ->addOption($option_name, $option_value, $override);
}