From c26263a7f9f376182aa62ee1e2e0ae8ea4e2ba73 Mon Sep 17 00:00:00 2001 From: berliner Date: Wed, 31 Jan 2024 10:26:40 +0100 Subject: [PATCH] HPC-9386: Fix issue with how controller is called, suit to changes in Drupal 10.2 --- .../ghi_subpages/src/LayoutBuilder/LogframeRebuildForm.php | 5 ++--- .../ghi_templates/src/LayoutBuilder/ImportPageConfigForm.php | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/html/modules/custom/ghi_subpages/src/LayoutBuilder/LogframeRebuildForm.php b/html/modules/custom/ghi_subpages/src/LayoutBuilder/LogframeRebuildForm.php index 0b771f812..def448cb7 100644 --- a/html/modules/custom/ghi_subpages/src/LayoutBuilder/LogframeRebuildForm.php +++ b/html/modules/custom/ghi_subpages/src/LayoutBuilder/LogframeRebuildForm.php @@ -196,9 +196,8 @@ protected function successfulAjaxSubmit(array $form, FormStateInterface $form_st $response->addCommand(new RedirectCommand($entity_url->toString())); } else { - /** @var \Drupal\layout_builder_ipe\Controller\EntityEditController $entity_edit_controller */ - $entity_edit_controller = $this->controllerResolver->getControllerFromDefinition(EntityEditController::class); - $response = $entity_edit_controller->edit($form_state->get('section_storage')); + $callable = $this->controllerResolver->getControllerFromDefinition(EntityEditController::class . '::edit'); + $response = $callable($form_state->get('section_storage')); $response->addCommand(new CloseDialogCommand('#layout-builder-modal')); } return $response; diff --git a/html/modules/custom/ghi_templates/src/LayoutBuilder/ImportPageConfigForm.php b/html/modules/custom/ghi_templates/src/LayoutBuilder/ImportPageConfigForm.php index 0a14db2d6..bce75461e 100644 --- a/html/modules/custom/ghi_templates/src/LayoutBuilder/ImportPageConfigForm.php +++ b/html/modules/custom/ghi_templates/src/LayoutBuilder/ImportPageConfigForm.php @@ -314,9 +314,8 @@ protected function successfulAjaxSubmit(array $form, FormStateInterface $form_st $response->addCommand(new RedirectCommand($entity_url->toString())); } else { - /** @var \Drupal\layout_builder_ipe\Controller\EntityEditController $entity_edit_controller */ - $entity_edit_controller = $this->controllerResolver->getControllerFromDefinition(EntityEditController::class); - $response = $entity_edit_controller->edit($form_state->get('section_storage')); + $callable = $this->controllerResolver->getControllerFromDefinition(EntityEditController::class . '::edit'); + $response = $callable($form_state->get('section_storage')); $response->addCommand(new CloseDialogCommand('#layout-builder-modal')); } return $response;