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
Branches
Tags
No related merge requests found
......@@ -125,9 +125,11 @@ abstract class UiPatternBase extends PluginBase implements UiPatternInterface {
* {@inheritdoc}
*/
public function getFieldsAsOptions() {
return array_map(function ($field) {
return $field['label'];
}, $this->getFields());
$options = [];
foreach ($this->getFields() as $field) {
$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