[TYPO3-ect] RFC: Common prefixId for several controllers
Steffen Kamper
steffen at dislabs.de
Fri Jan 12 11:24:23 CET 2007
Hi Elmar,
"Elmar HInz" <elmar.DOT.hinz at team.MINUS.red.DOT.net> schrieb im Newsbeitrag
news:mailman.1.1168592429.19237.typo3-team-extension-coordination at lists.netfielders.de...
> Hi,
>
> testing the conception of lib/div by the eFAQ project, I come to a point
> where the concept needs some refinement and I am looking for an
> appropriate term now.
>
> The TYPO3 coding guidelines for extensions require that all parameters of
> a plugin are handled within one array for some reasons. I don't know them
> in detail.
>
> The Kickstarter generates the line:
>
> var $prefixId = 'tx_test_pi1'; // Same as class name
>
> resulting in URLs parameters like:
>
> tx_test_pi1[table]=tt_content&tx_test_pi1[uid]=7
>
> Also lib/div uses the controllers classname for this prefix. So far.
>
> Now I want to put multiple plugins into the same page, that react to the
> same form parameters. Giving each of the plugins it's own controller
> class, the solution above comes to it's limits, because they have
> different classnames. So I need to choose a common prefixId for the
> multiple plugins of this setup.
>
> Question 1:
>
> Does anybody of the core developers know, what side effects
> that may have be, if any?
>
> Question 2:
>
> The varibale name $prefixId is a little unspecific and a want to give it a
> more precise name within lib/div. My own idea is $parameterPrefix. Any
> better suggestions?
>
> Regards
>
> Elmar
>
>
In calendar base, which is also MVC ( or better SMVC :-) ) there is a base
controller which has also this prefixId.
It works without any side effects, also having multiple instances in a page.
var $prefixId = 'tx_cal_controller';
In my opinion the naming is ok, cause it's a prefix working as a unique Id,
so there is no need to find a new name for it.
vg Steffen
More information about the TYPO3-team-extension-coordination
mailing list