Spurred on by webchick's sandbox https://drupal.org/sandbox/webchick/2051265, I've finished off the changes to the generator system which mean the components can be a lot more granular.
So a module build can request:
- multiple RouterItems
-- which on D7 request HookMenu
--- which requests the .module file
And on D8, the request goes instead:
- multiple RouterItems
-- which requests a Routing component
-- which also optionally request HookMenu
-- and which probably also need to request a Controller, but I haven't done that bit yet :)
I'd added the scaffold for the Routing generator class -- needs filling in still.
Comments
Comment #1
joachim CreditAttribution: joachim commentedTo expand on that...
RouterItems is an abstraction of the idea of a module defining a menu path. This is so that we can have that do different things on D6/7 and D8.
So far so good -- the generating system deals very easily with different core versions, we just have a RouterItem class and a RouterItem8 class, and override the method that defines subcomponents.
Where it's starting to get fiddly is the passing of actual data for the RouterItem. We need things like:
- path
- title
- access
- callback
... except on D8, access and callback are different.
And yet I'd like to keep the $component_data for RouterItem reasonably abstract and easy to use.
Though I'm not sure it's going to be possible to be consistent across versions if we want to be able to easily ask for different types of routes (page / form / entity_list / etc).
Comment #2
jmolivas CreditAttribution: jmolivas commentedHi joachim
We a re trying to build something similar using the Symfony Console Component http://symfony.com/doc/current/components/console/introduction.html
We have it on github
https://github.com/hechoendrupal/DrupalAppConsole
webchick told us about the module_builder at BADCamp since we did not know about it and she recommend contact you the maintainer and figure out how we can try to merge efforts
Comment #3
joachim CreditAttribution: joachim commentedHi
Looks like you've done quite a lot of work on that already.
I like the look of how your command like UI works. Module builder is probably going to need something of an overhaul on that front, as we add more options and complexity.
As for components, I've recently rebuilt the whole generating system to take a generalized and hierarchical approach to creating the different pieces that can make up a module. I suggest you take a look at the components currently in MB and see where there are gaps that you've got covered.
Comment #4
jmolivas CreditAttribution: jmolivas commentedYou can see this video that shows how the UI it look like
http://www.youtube.com/watch?v=NkHT2KctR-Y
We are currently working on minor details to Module & Controller & finishing Form generation next step will be Plugin generation
I will take a look at this MB code for sure
Comment #4.0
jmolivas CreditAttribution: jmolivas commentedUpdated issue summary.
Comment #5
joachim CreditAttribution: joachim as a volunteer commentedThis is now implemented in DCB.