You are here

function hook_blazy_build_alter in Blazy 7

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

Alters the entire Blazy output to support own features.

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 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 entire contents using theme_field(), or theme_item_list().

File

./blazy.api.php, line 229
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'][] = 'elevatezoomplus_pre_render_build';
  }
}