From 94d20809325f16b51123268af133c3e3b2631c4c Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 13 May 2024 18:58:13 +1200 Subject: [PATCH] FIX Pass arrays to addFieldsToTab --- src/DataObjects/WorkflowInstance.php | 4 ++-- src/Extensions/AdvancedWorkflowExtension.php | 2 +- src/Extensions/FileWorkflowApplicable.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DataObjects/WorkflowInstance.php b/src/DataObjects/WorkflowInstance.php index 8b38133b..5afab255 100644 --- a/src/DataObjects/WorkflowInstance.php +++ b/src/DataObjects/WorkflowInstance.php @@ -145,7 +145,7 @@ public function getCMSFields() $action = $this->CurrentAction(); if ($action->exists()) { $actionFields = $this->getWorkflowFields(); - $fields->addFieldsToTab('Root.Main', $actionFields); + $fields->addFieldsToTab('Root.Main', $actionFields->toArray()); $transitions = $action->getValidTransitions(); if ($transitions) { @@ -168,7 +168,7 @@ public function getCMSFields() $items ); - $fields->addFieldsToTab('Root.Main', $grid); + $fields->addFieldToTab('Root.Main', $grid); $this->extend('updateCMSFields', $fields); diff --git a/src/Extensions/AdvancedWorkflowExtension.php b/src/Extensions/AdvancedWorkflowExtension.php index 255f1c3f..b5059365 100644 --- a/src/Extensions/AdvancedWorkflowExtension.php +++ b/src/Extensions/AdvancedWorkflowExtension.php @@ -85,7 +85,7 @@ public function updateEditForm(Form $form) 'Root.WorkflowActions', _t('Workflow.WorkflowActionsTabTitle', 'Workflow Actions') ); - $fields->addFieldsToTab('Root.WorkflowActions', $wfFields); + $fields->addFieldsToTab('Root.WorkflowActions', $wfFields->toArray()); $form->loadDataFrom($data); diff --git a/src/Extensions/FileWorkflowApplicable.php b/src/Extensions/FileWorkflowApplicable.php index 4bdcb35d..b473751f 100644 --- a/src/Extensions/FileWorkflowApplicable.php +++ b/src/Extensions/FileWorkflowApplicable.php @@ -45,7 +45,7 @@ public function updateCMSFields(FieldList $fields) 'Root.WorkflowActions', _t('Workflow.WorkflowActionsTabTitle', 'Workflow Actions') ); - $fields->addFieldsToTab('Root.WorkflowActions', $wfFields); + $fields->addFieldsToTab('Root.WorkflowActions', $wfFields->toArray()); } }