«Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живёте.»

Стив Макконнелл

Моё резюме:


May 15, 2013

How do not show admin class at dashboard and dropdown menu?

Symfony2, PHP, Sonata Admin

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>


comments powered by Disqus