You are here

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

Common post-build tasks that should take place whenever a gallery of any type/source is built.

Overrides JuiceboxGalleryDrupalInterface::runCommonBuild

File

includes/JuiceboxGalleryDrupal.inc, line 86
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 runCommonBuild() {

  // Add all gallery options directly from the settings.
  $this
    ->setGalleryOptions();

  // Also attempt to translate interface strings.
  if (variable_get('juicebox_translate_interface', FALSE)) {
    $base_string = variable_get('juicebox_translate_base_languagelist', '');
    if (!empty($base_string)) {
      $this
        ->addOption('languagelist', check_plain(t($base_string)), FALSE);
    }
  }

  // Allow other modules to alter the built gallery data before it's
  // rendered. After this point the gallery should no longer change.
  drupal_alter('juicebox_gallery', $this, $this->data);
}