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

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Mon Feb 7 12:22:53 CET 2011


Lorenz Ulrich wrote:
> I have a method that is called from my AddressController.php:
>
> private function
> sendActivationEmail(Tx_Vsubscription_Domain_Model_Address $address) {
> }

Hello Lorenz!

I don't understand your example completely,
but I think you would pass a specific address object to the method.

So something like this should work:

$addressRepository = 
t3lib_div::makeInstance('Tx_Vsubscription_Domain_Repository_AddressRepository'); 

$address = $addressRepository->findByUid(17);

$this->sendActivationEmail($address);

Regards,
Thomas


More information about the TYPO3-project-typo3v4mvc mailing list