[TYPO3-dev] [BE] makeInstance and call userfunc
Francois Suter
fsuter at cobweb.ch
Tue Jan 29 17:25:07 CET 2008
Hi,
> Thanks, i replaced $this->IMAGE(); with $GLOBALS['TSFE']->cObj->IMAGE()
> and that is working but not for:
>
> $GLOBALS['TSFE']->cObj->pi_linkTP_keepPIvars_url
No, this can't work. "cObj" is an instance of tslib_cObj, but
pi_linkTP_keepPIvars_url is a property of the tslib_pibase class.
There's no instance of tslib_pibase in the globals, because it is
instantianted specifically for each plugin.
But if you create an instance of your plugin, e.g.
$myplugin = t3lib_div::makeInstance('myplugin');
then you can access the aforementioned variable as
$myplugin->pi_linkTP_keepPIvars_url
since your plugin class is supposed to extend tslib_pibase.
HTH
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
More information about the TYPO3-dev
mailing list