Closed mshtukin closed 11 years ago
Can you post the question on the sonata user mailing list? Thanks On Dec 19, 2011 3:10 PM, "Michael" < reply@reply.github.com> wrote:
I use admin class CampaignImageAdmin in other admin class CampaignAdmin as a sonata_type_collection. So editing of images are managed in CampaignAdmin class when i'm editing campaign. So i don't want CampaignImageAdmin class is shown on dashboard and dropdown menu. But i don't know how can i hide it? Is it possible???
Reply to this email directly or view it on GitHub: https://github.com/sonata-project/SonataAdminBundle/issues/460
As the doc doesn't provide any example of dashboard->groups configuration (http://sonata-project.org/bundles/admin/2-0/doc/reference/configuration.html), let me post mine here:
dashboard:
groups:
Products: []
Orders: []
References: []
Not sure if it's the best way (and that's why I'm not pushing a PR) but it's working.
If anybody else stumbles upon this by googling, the solution is just to add a attribute ( show_in_dashboard ) to the tag of the admin service definition:
<service id="you-service-id" class="%yourbundle.admin.yourservice.class%">
<tag name="sonata.admin" manager_type="orm" show_in_dashboard="false"/>
<argument/>
<argument>%yourbundle.admin.yourservice.entity%</argument>
<argument/>
</service>
For yaml configured bundles show_in_dashboard: false
@EricReiche Thank you very much! If one combines Google Groups, GitHub issue lists, Stack Overflow and the actual Sonata documentation, most of the features are documented...somewhere ;)
But if i want to hide this menu for somes roles ?
There is a good explanation in the sonata reference documentation on how to do that : http://sonata-project.org/bundles/admin/master/doc/reference/security.html
I use admin class CampaignImageAdmin in other admin class CampaignAdmin as a sonata_type_collection. So editing of images are managed in CampaignAdmin class when i'm editing campaign. So i don't want CampaignImageAdmin class is shown on dashboard and dropdown menu. But i don't know how can i hide it? Is it possible???