[TYPO3-german] [TYPO3 6.0] Extension Builder t3lib_div::makeInstance('');

Malte malte.beran at gmail.com
Fri Feb 22 11:11:42 CET 2013


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/PatientRequestController.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\PatientRequest');

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/GeneralUtility.php
on line 4158


Hat jemand ne Idee?


More information about the TYPO3-german mailing list