[TYPO3-english] how to call repository to another controller

Ivan Godorogea igodorogea at winify.com
Sat Feb 20 12:37:12 CET 2016


Hi Dilip,

first - controller and repository are not strongly/directly coupled, 
that means you can call/inject repository in any other extbase class and 
it will work.
Second - a few snippets from your code, some details, like TYPO3 
version, will be helpful.
Third - a shot in the dark will be - did you try this options 
https://wiki.typo3.org/Default_Orderings_and_Query_Settings_in_Repository#Default_Orderings_and_Query_Settings_TYPO3_6.0_-_6.2_.28extbase_6.0_-_6.2.29
especially this one -

$querySettings->setRespectStoragePage(FALSE);


Also you can try slack for more interactive help - 
https://forger.typo3.org/slack

Regards,
Ivan

On 20.02.2016 12:55, dilip mdl wrote:
> Hi,
>
> I have two controllers and two models (category and products), i 
> wanted to call products respository in category controller to get 
> products. But its giving me empty array even it has products of 
> particular category.
>
> Can somebody help me out please.
>
> Thanks,
> Dilip
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>



More information about the TYPO3-english mailing list