You are here

function hook_blazy_build_alter in Blazy 8.2

Same name and namespace in other branches
  1. 7 blazy.api.php \hook_blazy_build_alter()

Alters Blazy outputs entirely to support a custom (quasy-)lightbox.

In a case of ElevateZoom Plus, it adds a prefix large image preview before the Blazy Grid elements by adding an extra #theme_wrappers via #pre_render element.

Parameters

array $build: The renderable array of the entire Blazy output being modified.

array $settings: The available array of settings.

Related topics

1 invocation of hook_blazy_build_alter()
BlazyManager::build in src/BlazyManager.php
Returns the contents using theme_field(), or theme_item_list().

File

./blazy.api.php, line 194
Hooks and API provided by the Blazy module.

Code

function hook_blazy_build_alter(array &$build, array $settings = []) {
  if (!empty($settings['elevatezoomplus'])) {
    $build['#pre_render'][] = 'my_module_pre_render_build';
  }
}