symfony - How can I get custom routes inside sonata admin class -
I configure the knp menu inside the Sonata admin product class and I want to add links to other admin class (category) < / P>
My code is:
Configure secure function side menu (MenuItemInterface $ menu, $ action, adminInterface $ childAdmin = null) {$ menu-> AddChild ($--> 'Product.sidemenu.link_designer', array (), 'm2m'), array ('uri' => gtc; admin- & gt; generated URL ('sonata.classification .admin.category.list '))); } Unfortunately the route 'Sonata' ClassificationAdmin Category.show 'does not exist. Root also does not work with app / console router debug. I have no facility to bout inside the vendors within the definition of service.
Any thoughts? I found a simple solution I was wrong because the default menu item, defined in the Sonata demo, looks like this:
$ menu-> addChild ($ this-> trans ('product.sidemenu.view_variations'), array ('Yuri' => $ admin- & gt; Generation URL ( 'Sonata.product.admin.product.variation.list', array ('id' => $ id))); And to add a custom route, I had to add the root parameter to Yuri instead.
$ menu-> gt; Add child ($ ---> trance ('product.sidemenu.view_variations'), array ('path' = & gt; 'admin_sonata_classification_category_list')); Now everything works.
Comments
Post a Comment