[TYPO3-mvc] How to get arguments from another pluginName controller request

Michael Knoll mimi at kaktusteam.de
Sun Feb 27 02:09:22 CET 2011


Hi Marc,

there are in fact many examples where you need a more sofisticated 
parameter mapping than extbase is able to do at the moment.

We implemented a list generator in ExtBase. Now you can have many 
different lists on one page, each running on the same extension and the 
same pi name etc. So at the moment, there is no default way to manage 
this situation with Extbase.

What we did, was creating a namespace for each object using GP vars and 
using a GP var manager to map the corresponding parameters to the 
objects. Each object can have its own namespace identifier which looks like

ns1.ns1-1.ns1-1-1... and so an

this is mapped on

tx_extname_pi1[ns1][ns1-1][ns1-1-1][...] in your GP parameter names and 
later on in an array that has exactly the same structure.

Now we have a object creation process, that takes the namespace from an 
interface method of the corresponding object and injecting its gp-vars 
according to that namespace. Combined with a viewhelper, that generates 
the namespaces in our templates, this is a powerful mechanism.

For a current project, we had to go one step further and have individual 
suffixes for namespaces within a nested plugin. Therefore we simply 
added a suffix to our namespace before dispatching the GP vars to the 
respective objects and everything was working again.

I think, Extbase should have such a mechanism for being able to write 
generic extensions with it.


Greetings

Mimi



Am 22.02.11 18:34, schrieb Marc Bastian Heinrichs:
> Hey Kevin,
>
>> i have two instances of an extension on one page. One is plugin Pi1 and
>> the other one is plugin Pi2. Now when i submit a form from Pi1 i want
>> to get $this->arguments from Pi1 in the Pi2 controller.
>
> You could try to change the namespace of Pi2
> http://forge.typo3.org/projects/typo3v4-mvc/wiki/Configurable_Plugin_Namespaces
>
> But why you want to do this? I don't that this would be an clean concept
> in extbase.
>
> Best
> Marc Bastian
>



More information about the TYPO3-project-typo3v4mvc mailing list