[TYPO3-english] XClass in Typo3 6.2

Alexander Stehlik alexander.stehlik at gmail.com
Tue Mar 11 10:19:57 CET 2014


Hi,

as far as I know the "old" XCLASS concept does not work any more in 
TYPO3 6.2.

What should work though is the configuration you posted first:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['tx_srfeuserregister_display'] 
= array( 'className' => 'ux_tx_srfeuserregister_display');

But this will only work if the class is instantiated correctly with 
GeneralUtility::makeInstance() in sr_feuser_register.

I'm using this configuration quite often and it works:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['<OriginalClass>']['className'] 
= '<NewClassName>'.

You need to clear all caches to make sure sure that the configuration 
gets active, including system caches which you need to enable with TSConfig:

options.clearCache.system = 1

Kind regards,
Alex


Am 11.03.2014 07:37, schrieb PIT Solutions:
> Hi All,
>
> Now I am using Typo3 6.2beta5 version and in that website I need to include an xclass for the extension sr_feuser_regsiter. The extension is in "pi_base" and I tried the following methods to include xclasses, but not working anymore;
>
> -> localconf.php
>
>     $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['tx_srfeuserregister_display'] = array( 'className' => 'ux_tx_srfeuserregister_display');
>
> -> ext_autoload.php
>
>      $extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('extname');
>      return array( 'ux_tx_srfeuserregister_display' => $extensionPath.'class.ux_tx_srfeuserregister_display.php', );
>
> Does anybody knows the solution ?
>
> Thanks in advance,
> Arun Chandran
>


-- 
Alexander Stehlik
alexander.stehlik at gmail.com


More information about the TYPO3-english mailing list