Quite a while ago we wanted to insert menus relating to our other bundles, that were already defined as services in their own bundles, in to the cmf menu tree as submenus at various points.
At the time there definitely wasn't a way to do this without creating them all again in the fixtures or adding each individual menu item to the cmf via the admin for each bundle.
So we used a new factory that extended ContentAwareFactory, with a new bit of code in createFromNode to look for a child menu service attribute specified in the menu item. So that it can go get that service and embed that as a submenu at that point.
Question is, is there a better default way to do this? Things have matured considerably so maybe there is now a default way to do this, or even if not, maybe someone can see a better way to achieve the same thing.
While I never tried it I thought it should be possible to create your own menu item class (say you have a shop integrated and want to show categories in the menu) and add it somewhere in the menu tree. The problem with that I see is that you somehow need to inject at least the container into that class to be able to create your own children ...
Ah, that's a good thought. Might have a go at that. Thanks.
injecting the container or a service into a document should be doable with the doctrine listeners (see the readme of phpcr-odm)
closing this as symfony-cmf/menu-bundle#138 is the issue reviving this discussion