[TYPO3-dev] UperCamelCase class prefix in hooks
Steffen Müller
typo3 at t3node.com
Thu Apr 14 12:48:00 CEST 2011
Hi,
it seems that I am not allowed to use Tx_Myext_Class in hooks which call
t3lib_div->callUserFunction(). When I use tx_Myext_Class it works.
Example:
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['includeStaticTypoScriptSourcesAtEnd'][]
= 'Tx_MyExt_Hooks_TypoScript->includeMyStaticTypoScript';
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['includeStaticTypoScriptSourcesAtEnd'][]
= 'tx_MyExt_Hooks_TypoScript->includeMyStaticTypoScript';
Looking into the code of t3lib_div->callUserFunction() I found a
property $checkPrefix, which checks for 'user_' or 'tx_'. Since Extbase
suggests UpperCamelCase class names, we should add 'Tx_' to allowed
prefixes in t3lib_div->callUserFunction()
Did I miss something here?
--
cheers,
Steffen
More information about the TYPO3-dev
mailing list