You are here

public function JuiceboxGalleryDrupal::confBaseStylePresets in Juicebox HTML5 Responsive Image Galleries 7.2

Get the image style preset options that should be available in configuration style picklists.

This is in may ways just a wrapper for image_style_options() that allows the addition of specical options that only Juicebox understands (e.g. "multi-size").

Parameters

boolean $allow_multisize: Whether-or-not to allow the addition of a PRO "multi-size" option. This is only included if this option is TRUE and the currently detected library is compatible with multi-size features.

Return value

array An associative array of style presets.

Overrides JuiceboxGalleryDrupalInterface::confBaseStylePresets

File

includes/JuiceboxGalleryDrupal.inc, line 563
Class to extend a JuiceboxGalleryDecorator object with Drupal-specific logic and structures.

Class

JuiceboxGalleryDrupal
Class to extend a JuiceboxGalleryDecorator object with Drupal-specific logic and structures.

Code

public function confBaseStylePresets($allow_multisize = TRUE) {

  // Get available image style presets.
  $presets = image_style_options(FALSE);

  // If multisize is allowed, include it with the normal styles.
  if ($allow_multisize && !in_array('juicebox_multisize_image_style', $this->library['disallowed_conf'])) {
    $presets = array(
      'juicebox_multisize' => t('Juicebox PRO multi-size (adaptive)'),
    ) + $presets;
  }
  return $presets;
}