[TYPO3-german] t3lib_div::makeInstance im BE unter 6.2

JCL - Johannes C. Laxander jc at laxander.com
Sat May 10 00:33:35 CEST 2014


Hast du auch die namspace-Angabe gmacht? 

Johannes.

> -----Ursprüngliche Nachricht-----
> Von: typo3-german-bounces at lists.typo3.org 
> [mailto:typo3-german-bounces at lists.typo3.org] Im Auftrag von 
> Jan Bartels
> Gesendet: Samstag, 10. Mai 2014 00:00
> An: typo3-german at lists.typo3.org
> Betreff: [TYPO3-german] t3lib_div::makeInstance im BE unter 6.2
> 
> Ich probiere gerade, meine Ext wec_map unter 6.2 lauffähig zu 
> machen. Im FE läuft es schon, aber im BE hakt es gewaltig. Im 
> BE-Modul der Extension werden einige PHP-Klassen required:
> 
> Bisheriger Code
> ----8<----
> require_once(t3lib_extMgm::extPath('wec_map').'class.tx_wecmap
> _batchgeocode.php');
> $batchGeocode = t3lib_div:makeInstance('tx_wecmap_batchgeocode');
> ----8<----
> 
> Der neue Code lautet nun:
> ----8<----
> $batchGeocode =
> \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_wecma
p_batchgeocode');
> ----8<----
> (ohne require_once).
> 
> In der ext_autoload.php habe ich die Klasse registriert:
> ----8<----
> $extensionClassesPath =
> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('w
ec_map');
> 
> $default = array(
>          ...
>          'tx_wecmap_batchgeocode'  => $extensionClassesPath . 
> 'class.tx_wecmap_batchgeocode.php',
> 	...
> );
> return $default;
> ----8<----
> 
> Ruft man das BE-Modul auf, gibt es eine Fehlermeldung:
> Fatal error: Class 'TYPO3\CMS\Core\Utility\GeneralUtility' 
> not found in 
> /.../typo3conf/ext/wec_map/mod1/tx_wecmap_batchgeocode_ai.php 
> on line 38
> 
> Was muss ich da tun? Gibt es unterschiedliche Mechanismen im 
> FE und im BE?
> 
> Gruß,
> 
> Jan
> _______________________________________________
> TYPO3-german mailing list
> TYPO3-german at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german
> 



More information about the TYPO3-german mailing list