[TYPO3-mvc] Naming conventions

Bastian Waidelich bastian at typo3.org
Thu Sep 24 18:14:18 CEST 2009


Hi @all,

While cleaning up the blog example I bumped upon some issues with the 
current namings in extbase:

Currently the plugin is registered to the global TCA at 
tt_content.list.20.blogexample_pi1
That is different from the pibase extensions
tt_content.list.20.indexed_search, tt_content.list.20.tt_address_pi1, 
... (it should be "blog_example_pi1" insted of "blogexample_pi1").

This leads to the fact, that you can't write:
t3lib_extMgm::addPiFlexFormValue($_EXTKEY . 'pi1', 'FILE:EXT:...');

anymore in your ext_tables.php. Instead you'll have to do something like

$extensionName = t3lib_div::underscoredToUpperCamelCase($_EXTKEY);
t3lib_extMgm::addPiFlexFormValue(strtolower($extensionName) . 'pi1', 
'FILE:EXT:...');

I'd like to change this. And to avoid confusion we came up with 
following naming conventions:

Extension key:	  blog_example (= $_EXTKEY)
Extension name:	  BlogExample (used e.g. in class names)
Plugin name:	  MyPlugin
Plugin key:	  myplugin (lowercase, no underscores)
Plugin signature: blog_example_myplugin (used in TypoScript, TCA)
PluginNamespace:  tx_blogexample_myplugin (used to namespace GET/POST vars)

What do you think about this?

Another issue, is the TS plugin setup..
Currently it is stored in plugin.tx_blogexample / module.tx_blogexample
But what if you have multiple plugins?
Shouldn't that be
plugin.tx_blogexample_pi1 / module.tx_blogexample_m1

But the Configuration manager does not yet support this (it currently 
doesn't know the plugin/module name when loading the settings)

And than you'd had to configure each plugin separately - is that a problem?

..confusing stuff

Bastian


More information about the TYPO3-project-typo3v4mvc mailing list