[TYPO3-mvc] Reuse arguments in different action
Jonas Eberle
jonas.eberle at d-mind.de
Mon Dec 1 12:32:03 CET 2014
Hello,
this is a common pattern that I have yet solved in different (hacky,
workaroundy) ways with Extbase. I'd like to hear your oppinions:
I have 1 plugin that represents a search form and 1 that represents the
result list. Both need to be aware of submitted search parameters (the
list because it needs to apply constraints and the search form because
it needs to reflect current search constraints by prefilling fields).
They need to be separate because they could be presented in different
parts of one page or even solo.
How do you 'share' those arguments between 2 different plugins and their
respective actions?
Here is how I did it in recent projects:
1) Define a HttpParametersService (just to keep it separate from the
controller) that does some t3lib_div::_GP($key) to get the variables.
2) Just use $_REQUEST directly in the controller to get the key.
3) Use AJAX to drive the list (some projects need to be usable without
JavaScript, so this is not always an option)
Both seems awkward and non-Extbase-evangelical. Everytime I do this I
crawl the web to find any more elegant solutions...
Any suggestions?
--
Neu: Portal Region Stuttgart - www.region-stuttgart.de
Neu: emobil-in-bw.de
Neukunde: Statistisches Landesamt BaWü
--------------------------------
d-mind bei Facebook: http://www.facebook.com/werbeagentur.internetagentur.stuttgart
--------------------------------
d-mind
Fuchs/Weiß/Strobel GbR
Mörikestraße 69
70199 Stuttgart
Tel.: +49 711 280481-1 (Durchwahl: -18)
Fax: +49 711 2804813
Inhaber: Jens Fuchs, Michael Weiß, Jens Strobel
www.d-mind.de
More information about the TYPO3-project-typo3v4mvc
mailing list