Skip to content

Commit

Permalink
FIX Pass arrays to addFieldsToTab
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed May 13, 2024
1 parent 863cb32 commit 94d2080
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/DataObjects/WorkflowInstance.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -168,7 +168,7 @@ public function getCMSFields()
$items
);

$fields->addFieldsToTab('Root.Main', $grid);
$fields->addFieldToTab('Root.Main', $grid);

$this->extend('updateCMSFields', $fields);

Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/AdvancedWorkflowExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/FileWorkflowApplicable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down

0 comments on commit 94d2080

Please sign in to comment.