diff --git a/panels_ipe/panels_ipe.api.php b/panels_ipe/panels_ipe.api.php index 6980c37..62550f3 100644 --- a/panels_ipe/panels_ipe.api.php +++ b/panels_ipe/panels_ipe.api.php @@ -47,8 +47,10 @@ function hook_panels_ipe_blocks_alter(array &$blocks = array()) { * * @param array $layouts * The layouts that are currently available. + * @param \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant $panels_display + * The current Panels display. */ -function hook_panels_ipe_layouts_alter(array &$layouts = array()) { +function hook_panels_ipe_layouts_alter(array &$layouts, PanelsDisplayVariant $panels_display) { // Only show layouts that are in the 'threecol' category. foreach ($layouts as $key => $layout) { if ($layout['category'] !== 'threecol') { diff --git a/panels_ipe/src/Controller/PanelsIPEPageController.php b/panels_ipe/src/Controller/PanelsIPEPageController.php index b5dd09e..6825c5c 100644 --- a/panels_ipe/src/Controller/PanelsIPEPageController.php +++ b/panels_ipe/src/Controller/PanelsIPEPageController.php @@ -182,7 +182,7 @@ class PanelsIPEPageController extends ControllerBase { // Trigger hook_panels_ipe_layouts_alter(). Allows other modules to change // the list of layouts that are visible. - \Drupal::moduleHandler()->alter('panels_ipe_layouts', $data); + \Drupal::moduleHandler()->alter('panels_ipe_layouts', $data, $panels_display); // Reindex the blocks after they were altered in case one of them was // removed.