Project

General

Profile

Feature #22107 ยป addCESubCategories.diff

Administrator Admin, 2010-02-11 10:42

View differences:

t3lib/class.t3lib_tsparser_ext.php (working copy)
/**
* 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.
*
    (1-1/1)