[TYPO3-core] RFC #13510 : Feature: Add a Hook to add Sub Categories to the Constant Editor

Sebastian Gebhard sebastiangebhard at hoch2.de
Thu Feb 11 10:49:48 CET 2010


This is an SVN patch request.

Type: Feature

Bugtracker references: http://bugs.typo3.org/view.php?id=13510

Branches: trunk

Problem:
Currently the Sub Categories of the Constant Editor are hardcoded 
(Enable Features, Dimensions, etc).
Especially when you develop a flexible TypoScript Library which should 
be configurable with the Constant Editor it would be great if you could 
add custom Sub Categories.

Solution:
Provide a Hook
I added a constructor to t3lib_tsparser_ext, which can also be used for 
other hooks or initialization stuff. Currently it only includes my Hook 
(callUserFunction) to add Sub Categories.
The Usage of the Hook is documented in the source code.

Notes:
Steps to test:
- Apply Patch
- Register a PHP-Method for the Hook 
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tsparser_ext.php']['addTSConstantsSubCategories']
- Set up a function using the hook, you can copy/paste the one from the 
phpDoc
- Set up a constant in your TS using the category you set up in your method



Kind regards,

Sebastian Gebhard
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: addCESubCategories.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100211/27111c6f/attachment.txt>


More information about the TYPO3-team-core mailing list