\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\MbHcep\Domain\Mo del\PatientRequest');
Sorry, habe vergessen zu erwähnen, dass der Klassenname im Parameter ohne vorangehenden Backslash übergeben werden muss :-) Gruss Oli -----Ursprüngliche Nachricht----- Von: typo3-german-boun...@lists.typo3.org [mailto:typo3-german-boun...@lists.typo3.org] Im Auftrag von Malte Gesendet: Freitag, 22. Februar 2013 11:42 An: German TYPO3 Userlist Betreff: Re: [TYPO3-german] [TYPO3 6.0] Extension Builder t3lib_div::makeInstance(''); Moin Oliver, habe das so versucht über den Namespace, aber leider ohne Erfolg: $newPatientRequest = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('\TYPO3\MbHcep\Domain\M odel\PatientRequest'); Der angegebene full qualified class name ist korrekt. Ich bekomme diese Meldung: Fatal error: Class '\\TYPO3\MbHcep\Domain\Model\PatientRequest' not found in /var/www/current/typo3_src-6.0.2/typo3/sysext/core/Classes/Utility/GeneralUt ility.php on line 4158 Am 22.02.13 schrieb Oliver Beck <oli5...@gmail.com>: > Korrektur: > > \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance() > > -----Ursprüngliche Nachricht----- > Von: typo3-german-boun...@lists.typo3.org > [mailto:typo3-german-boun...@lists.typo3.org] Im Auftrag von Oliver > Beck > Gesendet: Freitag, 22. Februar 2013 11:30 > An: 'German TYPO3 Userlist' > Betreff: Re: [TYPO3-german] [TYPO3 6.0] Extension Builder > t3lib_div::makeInstance(''); > > Hi, > > \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstrance() > > Diese Funktion sollte gehen > > Gruss > > -----Ursprüngliche Nachricht----- > Von: typo3-german-boun...@lists.typo3.org > [mailto:typo3-german-boun...@lists.typo3.org] Im Auftrag von Malte > Gesendet: Freitag, 22. Februar 2013 11:12 > An: German TYPO3 Userlist > Betreff: [TYPO3-german] [TYPO3 6.0] Extension Builder > t3lib_div::makeInstance(''); > > Hallo Leute, > ich habe eine neue Extension gemacht mit einem Controller und der > kompletten CRUD Funktionalität. Bentutzt habe ich dazu den > Extension_Builder in der Version 2.5.2. > > Nun habe ich einen Fehler in der newAction Methode des Controllers: > > Fehler: > =================== > > Fatal error: Class 'TYPO3\MbHcep\Controller\t3lib_div' not found in > /var/www/current/typo3conf/ext/mb_hcep/Classes/Controller/PatientReque > stCont > roller.php > on line 83 > > Code: > =================== > > /** > * action new > * > * @param \TYPO3\MbHcep\Domain\Model\PatientRequest > $newPatientRequest > * @dontvalidate $newPatientRequest > * @return void > */ > public function > newAction(\TYPO3\MbHcep\Domain\Model\PatientRequest $newPatientRequest > = > NULL) { > if ($newPatientRequest == NULL) { // workaround for > fluid bug ##5636 > $newPatientRequest = t3lib_div::makeInstance(''); > } > $this->view->assign('newPatientRequest', > $newPatientRequest); > } > > > Er mag das t3lib_div::makeInstance(''); nicht mehr > > Ich habe versucht statt makeInstance den ObjectManager zu verwenden, > aber irgendwas mache ich falsch! > > > Code: > =================== > $newPatientRequest = > $this->objectManager->create('\TYPO3\MbHcep\Domain\Model\PatientReques > t'); > > Fehler: > =================== > Fatal error: Class '\\TYPO3\MbHcep\Domain\Model\PatientRequest' not > found in > /var/www/current/typo3_src-6.0.2/typo3/sysext/core/Classes/Utility/Gen > eralUt > ility.php > on line 4158 > > > Hat jemand ne Idee? > _______________________________________________ > TYPO3-german mailing list > TYPO3-german@lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german > > _______________________________________________ > TYPO3-german mailing list > TYPO3-german@lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german > > _______________________________________________ > TYPO3-german mailing list > TYPO3-german@lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german > _______________________________________________ TYPO3-german mailing list TYPO3-german@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german _______________________________________________ TYPO3-german mailing list TYPO3-german@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german