[TYPO3-mvc] Using Repository outside a controller

Christian Zenker christian.zenker at 599media.de
Wed Jul 21 09:48:05 CEST 2010


On Tue, 20 Jul 2010 20:15:48 +0200, Felix Oertel <mehl at foertel.com> wrote:
> Hi,
Hi.

>
>> What did not really work was setting up the configuration in the  
>> dispatcher to allow fetching of records from all pages.
>
> how did you try to configure the dispatcher?

That's the ugly part. As far as my understanding goes the method  
initializeConfigurationManagerAndFrameworkConfiguration() has to be  
called, but as it is protected the only way is to call the dispatch()  
method with the configuration. I actually tried to call a fake controller  
(the \FakeController actually needed to exist - but if it does not extend  
the base class an exception is thrown that might be catched to "stop" the  
method) - but it is way to ugly to do it this way.

So I solved this by the repository method. This way it works and it is  
comprehensible.

Christian.


More information about the TYPO3-project-typo3v4mvc mailing list