You are here

public function JuiceboxGallery::__construct in Juicebox HTML5 Responsive Image Galleries 7.2

Constructor

Parameters

string $id: A unique string id that can represent this gallery.

array $settings: Configuration data to be used by this gallery object. These options relate to any "output" processing applied to the raw gallery variables upon rendering.

  • filter_markup: Optional boolean indicating whether-or-not to filter all image title and caption values for syntactic compatibility with Juicebox. This designates a gallery-wide default and can still be overriden on an image-by-image basis. Defaults to TRUE.
  • process_attributes: Optional boolean to activate legacy attribute name support for underscore-separated and dash-separated attributes (e.g., convert image_url to imageURL). Defaults to FALSE.

File

includes/JuiceboxGallery.inc, line 45
A php-only set of methods to create the script and markup components of a Juicebox gallery.

Class

JuiceboxGallery
Class to generate the script and markup for a Juicebox gallery.

Code

public function __construct($id = '', $settings = array()) {

  // Set the ID.
  $this->id = $id;

  // Ensure some default settings are specified.
  $settings += array(
    'filter_markup' => TRUE,
    'process_attributes' => FALSE,
  );
  $this->settings = $settings;
}