Bug #69818
openExtensionService - getPluginNamespace should have signalSlot to build (not only set via TypoScript) own pluginnamespace
0%
Description
Sometimes it would be good to be able to override the pluginnamespace more dynamically then just using the TypoScript setting allows.
For instance appending a Input-Fieldnmae of the content element or the UID.
The reason is if you intend to create a plugin that can/should be used multiple times on the same site the pluginNamespace defines which plugin is actually involved.
As the ExtensionService itself is injected in quite a lot of classes it is a bit complicated to get the change to work everywhere.
The easist solution would add a signalSlot that allows to modify the default pluginnamespace.
Updated by Mathias Brodala about 9 years ago
Is this meant for multiple plugins to share the same namespace? In Extbase one can set plugin.myext_myplugin.view.pluginNamespace
for this.
Updated by Andreas Allacher about 9 years ago
No, same plugin different namespaces.
e.g. I have a CE Element twice on the same page which are not related to each other at all.
Except that they are the same plugin. Therefore I would have to ensure the namespace is different for both.
If it were just two it could be done via TS-Condition but this plugin will be used on multiple pages and multiple times. So the easiest way is to append the content element uid.
Another possibility I thought about would be to add the view.pluginNamespace as flexform setting that way one can override it via the settings and provide a default value via hook on storage
but honestly modifying the namespace directly in ExtensionService would be the easiest solution and I also think the best solution.
Maybe providing the ability to easily modify the ExtensionService per plugin like for RequestHandlers would also be a way to go. However, that is more complex especially since inject alone wouldn't work and I think a signalslot should be enough and wouldn't really hurt.
Updated by Andreas Kießling over 1 year ago
Any news on this? I debugged a 10.4 setup to have the same plugin with independent parameters and the best solution i came up with was to add a view.pluginNamespace field to the plugin flexform. Leaving the field empty creates the default namespace
It would be great however to have an event to modify the configuration that is returned from \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::getContextSpecificFrameworkConfiguration