1
|
Index: fluid/trunk/Classes/ViewHelpers/Form/SelectViewHelper.php
|
2
|
===================================================================
|
3
|
--- fluid/trunk/Classes/ViewHelpers/Form/SelectViewHelper.php (revision 2369)
|
4
|
+++ fluid/trunk/Classes/ViewHelpers/Form/SelectViewHelper.php (working copy)
|
5
|
@@ -93,6 +93,7 @@
|
6
|
$this->registerTagAttribute('size', 'string', 'Size of input field');
|
7
|
$this->registerTagAttribute('disabled', 'string', 'Specifies that the input element should be disabled when the page loads');
|
8
|
$this->registerArgument('options', 'array', 'Associative array with internal IDs as key, and the values are displayed in the select box', TRUE);
|
9
|
+ $this->registerArgument('optionsValuesArray', 'array', 'Associative array with options array keys as key, and the values are used as option value in the select box');
|
10
|
$this->registerArgument('optionValueField', 'string', 'If specified, will call the appropriate getter on each object to determine the value.');
|
11
|
$this->registerArgument('optionLabelField', 'string', 'If specified, will call the appropriate getter on each object to determine the label.');
|
12
|
$this->registerArgument('sortByOptionLabel', 'boolean', 'If true, List will be sorted by label.', FALSE, FALSE);
|
13
|
@@ -201,6 +202,12 @@
|
14
|
$value = $this->persistenceManager->getBackend()->getIdentifierByObject($value);
|
15
|
}
|
16
|
}
|
17
|
+ if ($this->arguments->hasArgument('optionsValuesArray')) {
|
18
|
+ $optionValuesArray = $this->arguments['optionsValuesArray'];
|
19
|
+ if (array_key_exists($key, $optionValuesArray)) {
|
20
|
+ $key = $optionValuesArray[$key];
|
21
|
+ }
|
22
|
+ }
|
23
|
$options[$key] = $value;
|
24
|
}
|
25
|
if ($this->arguments['sortByOptionLabel']) {
|