Commit 4210adf6 authored by larowlan's avatar larowlan

Issue #2902018 by harsha012, Meenakshi Gupta, vijaycs85, Sam152, timmillwood,...

Issue #2902018 by harsha012, Meenakshi Gupta, vijaycs85, Sam152, timmillwood, amateescu: Use array_column instead of array_map where possible in the Workflows module
parent e9542e5d
...@@ -64,9 +64,8 @@ public function form(array $form, FormStateInterface $form_state) { ...@@ -64,9 +64,8 @@ public function form(array $form, FormStateInterface $form_state) {
], ],
]; ];
$workflow_types = array_map(function ($plugin_definition) { $workflow_types = array_column($this->workflowTypePluginManager->getDefinitions(), 'label', 'id');
return $plugin_definition['label'];
}, $this->workflowTypePluginManager->getDefinitions());
$form['workflow_type'] = [ $form['workflow_type'] = [
'#type' => 'select', '#type' => 'select',
'#title' => $this->t('Workflow type'), '#title' => $this->t('Workflow type'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment