[TYPO3-mvc] Beginner question - Argument passed to controller must be an instance

Georg Ringer mail at ringerge.org
Mon Feb 7 12:30:47 CET 2011


Am 07.02.2011 12:27, schrieb Thomas "Thasmo" Deinhamer:
> Thomas "Thasmo" Deinhamer wrote:
>> $addressRepository =
>> t3lib_div::makeInstance('Tx_Vsubscription_Domain_Repository_AddressRepository');
>>
> 
> Ah, btw. - from TYPO3 4.5 on (Extbase 1.3) you should use the object
> manager, to load objects. Not sure about the syntax, but instead of
> t3lib_div::makeInstance('ABC') you should use something like
> $objectManager->create('ABC').

$demandObject =
$this->objectManager->get('Tx_News2_Domain_Model_NewsDemand');


Georg


More information about the TYPO3-project-typo3v4mvc mailing list