From f809678ae9e2cf160ec36bd1db9760238629b175 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Wed, 30 Mar 2022 18:36:38 +0200 Subject: [PATCH 1/2] Add missing class option --- src/Admin/AbstractAdmin.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Admin/AbstractAdmin.php b/src/Admin/AbstractAdmin.php index 4cf6551292..93afd4b86c 100644 --- a/src/Admin/AbstractAdmin.php +++ b/src/Admin/AbstractAdmin.php @@ -2394,6 +2394,7 @@ private function buildDatagrid(): ?DatagridInterface 'field_type' => ModelHiddenType::class, 'field_options' => [ 'model_manager' => $this->getModelManager(), + 'class' => $this->getClass(), ], 'operator_type' => HiddenType::class, ], [ From f58cd76f4eede0afe01372e0e7c38bb05b604362 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Thu, 31 Mar 2022 20:00:14 +0200 Subject: [PATCH 2/2] Fix --- src/Admin/AbstractAdmin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Admin/AbstractAdmin.php b/src/Admin/AbstractAdmin.php index 93afd4b86c..89efcfc14c 100644 --- a/src/Admin/AbstractAdmin.php +++ b/src/Admin/AbstractAdmin.php @@ -2393,8 +2393,8 @@ private function buildDatagrid(): ?DatagridInterface 'label' => false, 'field_type' => ModelHiddenType::class, 'field_options' => [ - 'model_manager' => $this->getModelManager(), - 'class' => $this->getClass(), + 'model_manager' => $this->getParent()->getModelManager(), + 'class' => $this->getParent()->getClass(), ], 'operator_type' => HiddenType::class, ], [