[TYPO3-mvc] RFC #10666: Allow plugins to be registered as new content element

Franz Koch typo3.RemoveForMessage at elements-net.de
Mon Nov 15 17:51:21 CET 2010


Hi Bastian :)

>> Not sure if I got you right. You like to drop the default
>> action/controller as well as the switchable ones and fetch those from
>> the PHP configuration directly?
>
> The default controller & action is currently not used anyways (it was
> only kept in the TS for backwards compatibility).

I think we should keep it as it's a nice feature for some configuration 
scenarios - and as you like examples, here is one ;)

Imagine a extension that's displaying the staff of a company and allows 
the staff to be viewed in different modes, like "profile picture", 
"businessCard" and "list/table". All these views share the same 
configuration, like fiters, items per page etc. and are thus part of a 
multiView plugin. These view are always allowed for that plugin and can 
be switched by the users/visitors. The editor should now have the 
possibility to define the default view to show on first hit of the page. 
Without the possibility to define a default controller/action you would 
have to provide three flexform options, all allowing the same 
controllers and actions but with a different order - and that's anything 
else then a good configuration concept for me. Much better would be to 
keep the allowed controllers->actions out of the flexform and simply set 
a default action to use, wouldn't it?

And personally I dislike the Controller->Action keys in flexforms 
anyways, as you'll lose the selections if you have to alter one of those 
keys (be it by changing a name or by simply allowing one more additional 
action). That's why I implemented the presets in my local branch 
(there's also ticket on forge with a patch that needs some nicer 
implementation). Maybe we should think about those presets (outsourced 
flexform configurations for controller->action pairs) again when 
refactoring that stuff.

> By specifying plugin and extension name, the bootstrap could fetch the
> configured controller/action pairs and they could be overridden just
> like in the flexform (it will only be allowed to change the order, you
> won't be able to add new actions here).

not only the order, but you have to be able to disallow/remove actions, 
don't you? (just like the current behavior)


> My suggestion for a global registry would be:
>
> $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'] = array(
> 'extbase' => array(
> 'extensions' => array(
> '<ExtensionName>' => array(
> '<PluginName1>' => array(
> array(
> '<Controller1>' => array('<action1>', '<action2>'),
> '<Controller2>' => array('<action3>'),
> )
> ),
> '<PluginName2>' => array(
> array(
> '<Controller1>' => array('<action1>', '<action2>'),
> '<Controller2>' => array('<action3>'),
> ),
> array(
> '<Controller1>' => array('<nonCachableAction1>')
> )
> ),
> ),
> ),
> ),
> );
>
> Does that make sense?

not for aprox. 90% of the world, but it at least looks good to me :) 
It's anyway nothing else then storing the information passed on plugin 
registration in an array.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list