[TYPO3-english] getting $GLOBALS['TSFE']->tmpl->setup[plugin.][myext] in eID

Xavier Perseguers xavier at typo3.org
Wed Nov 16 06:42:01 CET 2011


Hi Dominic,

> I try to get all my configuration values from ext_typoscript_setup.txt
> inside of my eID PHP script. But I dont find which instances I need to
> load for this.
>
> I tried
> $GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe', $TYPO3_CONF_VARS);

Basically right.

> But this was not right. Does anyone knows, what I need to load if I want
> to save the configuration of my plugin like this:
> $conf = GLOBALS['TSFE']->tmpl->setup['plugin.']['myext.'];

At the beginning of your main method of your eID class:

$this->initTSFE();

and

/**
  * Initializes TSFE and sets $GLOBALS['TSFE'].
  *
  * @return void
  */
protected function initTSFE() {
	$GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe', 
$GLOBALS['TYPO3_CONF_VARS'], t3lib_div::_GP('id'), '');
	$GLOBALS['TSFE']->connectToDB();
	$GLOBALS['TSFE']->initFEuser();
	$GLOBALS['TSFE']->checkAlternativeIdMethods();
	$GLOBALS['TSFE']->determineId();
	$GLOBALS['TSFE']->getCompressedTCarray();
	$GLOBALS['TSFE']->initTemplate();
	$GLOBALS['TSFE']->getConfigArray();

		// Get linkVars, absRefPrefix, etc
	TSpagegen::pagegenInit();
}

HTH

-- 
Xavier Perseguers
Release Manager TYPO3 4.6

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org



More information about the TYPO3-english mailing list