[TYPO3-mvc] Tx_Extbase_MVC_Controller_Argument StoragePage

"Christian Müller (Kitsunet)" christian at kitsunet.de
Mon Jun 21 20:47:21 CEST 2010


On 21.06.2010 20:41, Franz Koch wrote:
> Hi,
>
>> maybe a not so common problem, but I am creating an extension with
>> connection to static_countries. So far so good, I created a domain model
>> (which I think we should have in extbase as with fe_users), I created a
>> custom findAll method in my repository to to
>> setRespectStoragePage(FALSE) as static_countries records have pid 0 (or
>> is there a better way).
>> Now if I have a country as argument in an action controller it doesn't
>> work to transform uid -> object because in findObjectByUid it is not set
>> so there is no way to have it as argument. So have an annotation to
>> setRespectStoragePage(FALSE) or any other idea?
>>
>> I can code it, I just first wanted to discuss the need and way to
>> solve it.
>
> I haven't had a look at the code, but I'd say extbase should use a
> repository (or maybe even a factory via a @factory annotation etc) to
> resolve a object if one is available. If none is available it shall
> proceed as it does currently.
> Or it should strictly ignore the storagePage, just as it does when
> mapping properties.
>
> A annotation only needed for a particular storageBackend is no solution
> we should aim for I think.
>
Yep I agree, that is what I don't like about it too. Actually I "hacked" 
the installation I use the plugin on to ignore StoragePage in 
Tx_Extbase_MVC_Controller_Argument, but that obviously could lead to 
other problems I guess. Thinking of plugins that are used in different 
places with different storage folders you could call an item from one 
storage folder with the "wrong" plugin, the question is, if that is too 
bad. What I am just thinking... Can I add 0 as Storage PID? If yes then 
that could simply been done (maybe even internally in storageBackend?).


More information about the TYPO3-project-typo3v4mvc mailing list