### Eclipse Workspace Patch 1.0 #P TYPO3 v4 trunk Index: t3lib/class.t3lib_tsparser_ext.php =================================================================== --- t3lib/class.t3lib_tsparser_ext.php (revision 6895) +++ t3lib/class.t3lib_tsparser_ext.php (working copy) @@ -180,6 +180,37 @@ /** + * Constructor to do some initialization + * @return void + */ + function __construct() { + + /** + * Hook to add custom subcategories for TypoScript Constants + * + * Your function will receive the current set of subcategories in $params['subCategories'] + * and has to include them in the array it returns - otherwise you overwrite the existing set. + * + * Example: + * function hook_addTSConstantsSubCategories($params, $reference) { + * $myNewCategories = array( + * 'pagerendering' => array('Page Rendering', 'h') + * ); + * return array_merge($params['subCategories], $myNewCategories); + * } + */ + if (is_array ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tsparser_ext.php']['addTSConstantsSubCategories'])) { + foreach($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tsparser_ext.php']['addTSConstantsSubCategories'] as $funcRef) { + $params = array( + 'subCategories' => $this->subCategories + ); + $this->subCategories = t3lib_div::callUserFunction($funcRef, $params, $this); + } + } + } + + + /** * This flattens a hierarchical setuparray to $this->flatSetup * The original function fetched the resource-file if any ('file.'). This functions doesn't. *