[TYPO3-mvc] passing on demand object to various views/formats

Nikolas Hagelstein lists at shr.cc
Thu Mar 10 12:40:59 CET 2011


Hi,
Am 04.03.2011 02:32, schrieb Thomas Allmer:
> it all works pretty nice now :)
>
> But I got a few more questions... :p
> As my Demand Object also uses own model classes (e.g. @var
> Tx_CdgLabors_Domain_Model_Labor) I now seem to manually initialize them...
> $demandOverwrite = $this->initDemandOverwrite($demandOverwrite);
>
> I just go through the array and replace all object uids with the object
> $demandOverwrite['labor'] =
> $this->laborRepository->findByUid($demandOverwrite['labor']);

Well there is no need to perform a findByUid within the init method. 
Just let this do the repository within the findDemanded method.
Actually you can use plain uid's.

though...not sure if i got you right.....

If the init is just to have "speaking" values within the view i would 
keep things separated.

hmm confused, not sure what you aim for ...enlight me please :)

Cheers,
Nikolas



More information about the TYPO3-project-typo3v4mvc mailing list