You are here

public function ElevateZoomPlusManager::buildAlter in ElevateZoom Plus 8

Same name and namespace in other branches
  1. 7 src/ElevateZoomPlusManager.php \Drupal\elevatezoomplus\ElevateZoomPlusManager::buildAlter()

Takes over original pre_render to avoid working with early render.

File

src/ElevateZoomPlusManager.php, line 219

Class

ElevateZoomPlusManager
Provides ElevateZoom Plus library methods mainly for hooks.

Namespace

Drupal\elevatezoomplus

Code

public function buildAlter(array &$build, $settings = []) {
  if ($this
    ->isApplicable($settings)) {
    $build = [
      '#theme' => 'elevatezoomplus',
      '#build' => $build,
      '#pre_render' => [
        [
          $this,
          'preRenderBuild',
        ],
      ],
    ];
  }
}