2

I'd like to group my Craft plugins using the PSR-0 Standard, I was hoping I could use the following:

CompanyName_PluginNamePlugin extends BasePlugin

plugins/
    companyname/
       pluginname/
           CompanyName_PluginNamePlugin.php

Is it possible to group plugins in sub folders? Or do I just need to prefix my plugin folder - eg:

plugins/
   companyname_pluginname/
       CompanyName_PluginNamePlugin.php

This gets messy if I want to group any further:

plugins/
    companyname_pluginname
    companyname_subgroup_otherpluginname
    companyname_secondsubgroup_otherpluginname

Thanks,

Phil.

1

Craft plugin naming conventions follow a specific format.

The plugin folder must live immediately under the craft/plugin folder and it must be the all lowercase name of your plugin's handle.

Your primary plugin class must live immediately in that folder and is named after your plugin's handle plus the word "Plugin". i.e. PluginHandlePlugin.

Craft doesn't support any concept of multiple primary plugin class files in one plugin folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.