You are here

panels.api.php in Panels 8.3

Same filename and directory in other branches
  1. 8.4 panels.api.php
  2. 7.3 panels.api.php

Hooks provided by Panels.

File

panels.api.php
View source
<?php

/**
 * @file
 * Hooks provided by Panels.
 */
use Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant;

/**
 * Allow modules to alter the built Panels output.
 *
 * @param array &$build
 *   The fully built render array.
 * @param \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant $panels_display
 *   The Panels display that was rendered.
 */
function hook_panels_build_alter(array &$build, PanelsDisplayVariant $panels_display) {
  $build['extra'] = [
    '#markup' => '<div>Some extra markup</div>',
  ];
}

Functions

Namesort descending Description
hook_panels_build_alter Allow modules to alter the built Panels output.