You are here

abstract class JuiceboxGalleryDecorator in Juicebox HTML5 Responsive Image Galleries 7.2

Base decorator class for a Juicebox Gallery.

Hierarchy

Expanded class hierarchy of JuiceboxGalleryDecorator

File

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

View source
abstract class JuiceboxGalleryDecorator implements JuiceboxGalleryInterface {

  // Base object to be decorated.
  protected $gallery;

  /**
   * Constructor.
   *
   * @param JuiceboxGalleryInterface $juicebox
   *   A plain-PHP Juicebox gallery object.
   */
  public function __construct(JuiceboxGalleryInterface $gallery) {
    $this->gallery = $gallery;
  }

  /**
   * {@inheritdoc}
   */
  public function setId($value, $reset = TRUE) {
    return $this->gallery
      ->setId($value, $reset);
  }

  /**
   * {@inheritdoc}
   */
  public function getId() {
    return $this->gallery
      ->getId();
  }

  /**
   * {@inheritdoc}
   */
  public function addImage($src_data = array(), $title = '', $caption = '', $filter = NULL, $override_id = NULL, $offset = NULL) {
    return $this->gallery
      ->addImage($src_data, $title, $caption, $filter, $override_id, $offset);
  }

  /**
   * {@inheritdoc}
   */
  public function updateImage($image_id, $src_data = array(), $title = '', $caption = '', $filter = TRUE) {
    return $this->gallery
      ->updateImage($image_id, $src_data, $title, $caption, $filter);
  }

  /**
   * {@inheritdoc}
   */
  public function getImages($filtered = FALSE) {
    return $this->gallery
      ->getImages($filtered);
  }

  /**
   * {@inheritdoc}
   */
  public function removeImage($id) {
    return $this->gallery
      ->removeImage($id);
  }

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

  /**
   * {@inheritdoc}
   */
  public function getOptions($filtered = FALSE) {
    return $this->gallery
      ->getOptions($filtered);
  }

  /**
   * {@inheritdoc}
   */
  public function removeOption($option_name) {
    return $this->gallery
      ->removeOption($option_name);
  }

  /**
   * {@inheritdoc}
   */
  public function getChecksum() {
    return $this->gallery
      ->getChecksum();
  }

  /**
   * {@inheritdoc}
   */
  public function renderXml($script_wrap_id = NULL) {
    return $this->gallery
      ->renderXml($script_wrap_id);
  }

  /**
   * {@inheritdoc}
   */
  public function renderEmbed() {
    return $this->gallery
      ->renderEmbed();
  }

  /**
   * {@inheritdoc}
   */
  public function renderJavascript($xml_url, $add_script_tags = FALSE, $jquery_defer = FALSE) {
    return $this->gallery
      ->renderJavascript($xml_url, $add_script_tags, $jquery_defer);
  }

  /**
   * {@inheritdoc}
   */
  public function getJavascriptVars($xml_url) {
    return $this->gallery
      ->getJavascriptVars($xml_url);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
JuiceboxGalleryDecorator::$gallery protected property
JuiceboxGalleryDecorator::addImage public function Add a new image to the gallery. Overrides JuiceboxGalleryInterface::addImage
JuiceboxGalleryDecorator::addOption public function Add a new Juicebox configuration option to the gallery. Overrides JuiceboxGalleryInterface::addOption
JuiceboxGalleryDecorator::getChecksum public function Get a gallery checksum. Overrides JuiceboxGalleryInterface::getChecksum
JuiceboxGalleryDecorator::getId public function Getter method for the gallery ID. Overrides JuiceboxGalleryInterface::getId
JuiceboxGalleryDecorator::getImages public function Getter method for the gallery images. Overrides JuiceboxGalleryInterface::getImages
JuiceboxGalleryDecorator::getJavascriptVars public function Get the variables needed to instantiate a new JS Juicebox. These values can be used as direct constructor inputs for a new juicebox object. Overrides JuiceboxGalleryInterface::getJavascriptVars
JuiceboxGalleryDecorator::getOptions public function Getter method for the gallery options. Overrides JuiceboxGalleryInterface::getOptions
JuiceboxGalleryDecorator::removeImage public function Remove an image from the gallery. Overrides JuiceboxGalleryInterface::removeImage
JuiceboxGalleryDecorator::removeOption public function Remove an option from the gallery. Overrides JuiceboxGalleryInterface::removeOption
JuiceboxGalleryDecorator::renderEmbed public function Get the embed code for a Juicebox gallery once images and options have been added. Overrides JuiceboxGalleryInterface::renderEmbed
JuiceboxGalleryDecorator::renderJavascript public function Get the javascript code for a Juicebox gallery once images and options have been added. Overrides JuiceboxGalleryInterface::renderJavascript
JuiceboxGalleryDecorator::renderXml public function Render the XML for a Juicebox gallery once images and options have been added. Overrides JuiceboxGalleryInterface::renderXml
JuiceboxGalleryDecorator::setId public function Setter method for the gallery ID (in case it was not passed in constructor). Overrides JuiceboxGalleryInterface::setId
JuiceboxGalleryDecorator::updateImage public function 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. Overrides JuiceboxGalleryInterface::updateImage
JuiceboxGalleryDecorator::__construct public function Constructor. 1