[TYPO3-core] RFC #10245: adding itemsProcFunc to wizard functionality

Kai Vogel kai.vogel at speedprogs.de
Wed Jan 12 22:20:27 CET 2011


 Hey all,

 this is a SVN patch request and reminder for a feature request from 
 2009 ;-)

 Type: feature

 Branch: trunk

 BT reference:
 http://bugs.typo3.org/view.php?id=10245

 Problem:
 It's not possible to add items via "itemsProcFunc" to a wizard of type 
 "select" for a field in TCA.

 Solution:
 The attached patch extends the "renderWizards" method to process an 
 "itemsProcFunc" in wizard config.

 Example:

 TCA configuration in extTables.php
 ===================================================================
 include(PATH_site . 'user_test.php');
 $GLOBALS['TCA']['tt_content']['columns']['header']['config'] = array(
   'type'    => 'input',
   'size'    => 30,
   'wizards' => array(
     'test'    => array(
       'type'          => 'select',
       'items'         => array(),
       'itemsProcFunc' => 'user_test->main', // <-- new!
     )
   )
 );

 Content of the user_test.php
 ===================================================================
 <?php
   class user_test {
     public function main(&$params, &$ref) {
       $params['items'] = array(
         array('First header', 'first'),
         array('Second header', 'second'),
       );
     }
   }
 ?>


 Best regards
 --
 Kai Vogel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wizard_itemsProcFunc-core-10047.diff
Type: text/x-patch
Size: 833 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110112/63cb0d50/attachment.bin>


More information about the TYPO3-team-core mailing list