[TYPO3-core] TYPO3 6.0: namespaced classes and typo3/*.php scripts
François Suter
fsu-lists at cobweb.ch
Mon Jan 21 12:29:07 CET 2013
Hi all,
At the root of the "typo3/" folder we have a lot of PHP files which are
called directly during backend operations. In my particular case I was
focused on wizard_forms.php, which we commonly xclass to implement
custom input types.
This proved impossible with TYPO3 6.0 because the wizard_forms.php
itself tries to instantiate "SC_wizard_forms" instead of
"TYPO3\\CMS\\Backend\\Controller\\Wizard\\FormsController":
require_once
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('backend') .
'Classes/Controller/Wizard/FormsController.php';
// Make instance:
$SOBE =
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('SC_wizard_forms');
$SOBE->init();
...
Changing to:
$SOBE =
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\Wizard\\FormsController');
still works fine and makes xclassing possible again.
Some other typo3/*.php files have been changed to instantiate the new
class, which seems correct. I just wanted to validate that before
submitting a patch for at least wizard_forms.php, but also for all other
typo3/*.php files (where needed). So is that correction indeed right?
Cheers
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
More information about the TYPO3-team-core
mailing list