[TYPO3-mvc] Problems with widget.paginate ViewHelper

g4-lisz at tonarchiv.ch g4-lisz at tonarchiv.ch
Fri Sep 9 16:16:05 CEST 2011


On 09.09.2011 10:05, Franz Koch wrote:
> Hey,
>
>> $repository = new 
>> Tx_Myextension_Domain_Repository_CollectionRepository();
>> $query = $repository->createQuey();
>> $query->matching(...);
>> $this->view->assign('collection', $query->execute());
>>
>> This should work (AFAK findByFoo() returns $query->execute(), too)?
>
> well, yes, it would work, but it's not a clean code. Keep the query 
> stuff inside the repository and create a special findByWhatever method 
> with as many arguments you need to perform the query.
>
ok, thanks, for the hint! keeping code tidy... ;)


More information about the TYPO3-project-typo3v4mvc mailing list