Skip to content
Snippets Groups Projects
Commit 6bebcdaa authored by Aleksi Peebles's avatar Aleksi Peebles Committed by Antonio De Marco
Browse files

Fix field select option values (#98)

parent 4bef9744
No related branches found
No related tags found
No related merge requests found
...@@ -125,9 +125,11 @@ abstract class UiPatternBase extends PluginBase implements UiPatternInterface { ...@@ -125,9 +125,11 @@ abstract class UiPatternBase extends PluginBase implements UiPatternInterface {
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getFieldsAsOptions() { public function getFieldsAsOptions() {
return array_map(function ($field) { $options = [];
return $field['label']; foreach ($this->getFields() as $field) {
}, $this->getFields()); $options[$field['name']] = $field['label'];
}
return $options;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment