function hook_panels_ipe_blocks_alter in Panels 8.3
Same name and namespace in other branches
- 8.4 panels_ipe/panels_ipe.api.php \hook_panels_ipe_blocks_alter()
Modify the list of blocks available through the IPE interface.
Parameters
array $blocks: The blocks that are currently available.
1 invocation of hook_panels_ipe_blocks_alter()
- PanelsIPEPageController::getBlockPlugins in panels_ipe/
src/ Controller/ PanelsIPEPageController.php - Gets a list of Block Plugins from the server.
File
- panels_ipe/
panels_ipe.api.php, line 36 - Hooks specific to the Panels IPE module.
Code
function hook_panels_ipe_blocks_alter(array &$blocks = array()) {
// Only show blocks that were provided by the 'mymodule' module.
foreach ($blocks as $key => $block) {
if ($block['provider'] !== 'mymodule') {
unset($blocks[$key]);
}
}
}