function hook_panels_build_alter in Panels 8.4
Same name and namespace in other branches
- 8.3 panels.api.php \hook_panels_build_alter()
Allow modules to alter the built Panels output.
Parameters
array &$build: The fully built render array.
\Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant $panels_display: The Panels display that was rendered.
1 invocation of hook_panels_build_alter()
- PanelsDisplayVariant::build in src/
Plugin/ DisplayVariant/ PanelsDisplayVariant.php - Builds and returns the renderable array for the display variant.
File
- ./
panels.api.php, line 18 - Hooks provided by Panels.
Code
function hook_panels_build_alter(array &$build, PanelsDisplayVariant $panels_display) {
$build['extra'] = [
'#markup' => '<div>Some extra markup</div>',
];
}