From ada36aaab87803419561652d65dfa139b99d5e61 Mon Sep 17 00:00:00 2001 From: Tony Air Date: Fri, 19 Jul 2024 12:41:13 +0200 Subject: [PATCH] IMPR: Pass params to parent class --- .../GridFieldConfig_RecordEditor.php | 2 +- .../GridFieldConfig_RelationEditor.php | 2 +- .../A2nt/CMSNiceties/Widgets/SubmenuWidget.ss | 27 +++++++++++++------ 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/Forms/GridField/GridFieldConfig_RecordEditor.php b/src/Forms/GridField/GridFieldConfig_RecordEditor.php index 6c53a8a..298d8eb 100644 --- a/src/Forms/GridField/GridFieldConfig_RecordEditor.php +++ b/src/Forms/GridField/GridFieldConfig_RecordEditor.php @@ -10,7 +10,7 @@ class GridFieldConfig_RecordEditor extends GridFieldGridFieldConfig_RecordEditor { public function __construct($itemsPerPage = null) { - parent::__construct(); + parent::__construct($itemsPerPage); $this->removeComponentsByType([ GridField_ActionMenu::class, diff --git a/src/Forms/GridField/GridFieldConfig_RelationEditor.php b/src/Forms/GridField/GridFieldConfig_RelationEditor.php index 8def1cb..29dd7a1 100644 --- a/src/Forms/GridField/GridFieldConfig_RelationEditor.php +++ b/src/Forms/GridField/GridFieldConfig_RelationEditor.php @@ -10,7 +10,7 @@ class GridFieldConfig_RelationEditor extends GridFieldGridFieldConfig_RelationEd { public function __construct($itemsPerPage = null, $showPagination = null, $showAdd = null) { - parent::__construct(); + parent::__construct($itemsPerPage, $showPagination, $showAdd); $this->removeComponentsByType([ GridField_ActionMenu::class, diff --git a/templates/A2nt/CMSNiceties/Widgets/SubmenuWidget.ss b/templates/A2nt/CMSNiceties/Widgets/SubmenuWidget.ss index bfb4240..4df7c2f 100755 --- a/templates/A2nt/CMSNiceties/Widgets/SubmenuWidget.ss +++ b/templates/A2nt/CMSNiceties/Widgets/SubmenuWidget.ss @@ -1,14 +1,25 @@ <% if $Submenu %>