[TYPO3-german] 6.2 Extbase - Problem mit makeInstance() und Repository
g4-lisz at tonarchiv.ch
g4-lisz at tonarchiv.ch
Tue Apr 15 00:43:59 CEST 2014
Hallo,
noch ein Problem in meiner Extension, die unter 4.6 funktioniert hat:
In meine Model Klasse benötige ich an einer Stelle ein Repository,
welches mit makeInstance() instanziiert wird:
/**
* Returns the messung
*
* @return
Tx_Extbase_Persistence_ObjectStorage<Tx_Hplusinfo_Domain_Model_Messung>
*/
public function getMessung() {
$repository =
t3lib_div::makeInstance('Tx_Hplusinfo_Domain_Repository_MessungRepository');
return $repository->findByKlinik($this);
}
Hier kriege ich aber den Fehler:
#1: PHP Catchable Fatal Error: Argument 1 passed to
TYPO3\CMS\Extbase\Persistence\Repository::__construct() must implement
interface TYPO3\CMS\Extbase\Object\ObjectManagerInterface, none given,
called in
/var/www/typo3_src-6.2.0/typo3/sysext/core/Classes/Utility/GeneralUtility.php
on line 4280 and defined in
/var/www/typo3_src-6.2.0/typo3/sysext/extbase/Classes/Persistence/Repository.php
line 89 (More information)
TYPO3\CMS\Core\Error\Exception thrown in file
/var/www/typo3_src-6.2.0/typo3/sysext/core/Classes/Error/ErrorHandler.php in
line 108.
Offfenbar fehlt da noch ein Argument bei makeInstance() - was muss ich
da mitgeben?
Grüße,
Till
More information about the TYPO3-german
mailing list