Sonata管理员覆盖服务配置(Sonata admin overwrite service configuration)

编程入门 行业动态 更新时间:2024-10-27 21:21:50
Sonata管理员覆盖服务配置(Sonata admin overwrite service configuration)

我安装了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

更多推荐

本文发布于:2023-07-29 15:44:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1317553.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:管理员   admin   Sonata   configuration   service

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!