[FEATURE] Add itemsProcFunc to wizard functionality
authorSven Juergens <post@blue-side.de>
Wed, 9 Mar 2011 14:26:25 +0000 (15:26 +0100)
committerSusanne Moog <typo3@susannemoog.de>
Thu, 31 Mar 2011 13:39:18 +0000 (15:39 +0200)
If you add a wizard to a BE input field, you can define items in configuration.
What is missing is the itemsProcFunc, to dynamically add items.

Change-Id: Ia9ab12e110b98af874748cd9e875a4d2d6cbcb2e
Resolves: #19898
Reviewed-on: http://review.typo3.org/1107
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
t3lib/class.t3lib_tceforms.php

index 69fe773..16c5048 100644 (file)
@@ -4060,6 +4060,12 @@ class t3lib_TCEforms {
                                                        $TSconfig[$field] = $TSconfig[$field]['wizards.'][$wid . '.'];
                                                        $selItems = $this->addSelectOptionsToItemArray($this->initItemArray($fieldValue), $fieldValue, $TSconfig, $field);
 
+                                                               // Process items by a user function:
+                                                       if (!empty($wConf['itemsProcFunc'])) {
+                                                               $funcConfig = (!empty($wConf['itemsProcFunc.']) ? $wConf['itemsProcFunc.'] : array());
+                                                               $selItems = $this->procItems($selItems, $funcConfig, $wConf, $table, $row, $field);
+                                                       }
+
                                                        $opt = array();
                                                        $opt[] = '<option>' . $iTitle . '</option>';
                                                        foreach ($selItems as $p) {