我安装了sonata管理包,其中包含来自同一供应商的通知包。 但是,我不想在管理面板上显示通知包。
我知道,为了做到这一点,我可以使用:
show_in_dashboard="false"我把它放在供应商文件夹上,它可以工作,但我想把它放在config.yml上,这样就不会在服务器或版本更新之间造成问题。
有关如何做到这一点的任何想法?
对于谁可能会关心禁用演示文稿的正常语法是:
<tag name="sonata.admin" manager_type="orm" group="sonata_notification" label="notifications" label_translator_strategy="sonata.admin.label.strategy.underscore" show_in_dashboard="false" />或者在yml中:
tags: - { name: sonata.admin, manager_type: orm, group: "Some Group", label: "", show_in_dashboard: false }谢谢
I have the sonata admin bundle installed with the notifications bundle from the same vendor. However I don't want to display the notification bundle on the admin panel.
I know that, in order to do this, I can use:
show_in_dashboard="false"I have placed it on the vendor folder and it works but I wanted to place it on the config.yml so it doesn't cause problems between server or version updates.
Any idea on how to do this?
For whom may care the normal syntax to disable the presentation is:
<tag name="sonata.admin" manager_type="orm" group="sonata_notification" label="notifications" label_translator_strategy="sonata.admin.label.strategy.underscore" show_in_dashboard="false" />or in yml:
tags: - { name: sonata.admin, manager_type: orm, group: "Some Group", label: "", show_in_dashboard: false }Thanks
最满意答案
我解决这个问题的方法是在sonata_admin配置中明确指定要在仪表板中显示哪些管理服务。
sonata_admin: dashboard: blocks: # display a dashboard block - { position: left, type: sonata.admin.block.admin_list } groups: some_group: label: "Some group" items: - some_admin_service - some_other_admin_Service some_other_group: label: "Some other group" items: ...可以在文档http://sonata-project.org/bundles/admin/2-1/doc/reference/dashboard.html中找到更多示例。
The way I solve this problem is by specifying explicitly in sonata_admin config which admin services to display in dashboard.
sonata_admin: dashboard: blocks: # display a dashboard block - { position: left, type: sonata.admin.block.admin_list } groups: some_group: label: "Some group" items: - some_admin_service - some_other_admin_Service some_other_group: label: "Some other group" items: ...Some more examples can be found in documentation http://sonata-project.org/bundles/admin/2-1/doc/reference/dashboard.html
更多推荐
发布评论