ZF-4326: Should addDijit auto register dijit modules? Would be nice.

Description

While using the Zend_Dojo component, I have found it rather tedious to have call registerModule when using addDijit. Since each dijit requires a dojoType to be specified it should be possible to have the module of the dijit registered automatically, just as it does when creating a dijit through the view helper interface.

In order to do this, we'd probably need to make the protected members _dijit and _module of the dijits either constants or provide a public accessor method to retrieve these values.

I believe constants would be the best method as we wouldn't have to instantiate the objects to retrieve these values during the addDijit call.

Comments

addDijit() is primarily for use by the various dijit view helpers. Can you present the use case where you're calling it in your own code?

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.