简体   繁体   English

添加不受Sonata Admin Bundle管理的实体

[英]Adding entity not managed by Sonata Admin Bundle

I have several entities which are managed by Sonata AdminBundle, they are all located in my dashboard, no problem. 我有几个由Sonata AdminBundle管理的实体,它们都位于我的仪表板中,没问题。 I have other entities which are customized and not managed by Sonata AdminBundle, I want to insert them in my dashboard. 我有其他实体是自定义的而不是由Sonata AdminBundle管理,我想将它们插入我的仪表板中。 I read on different forums that we can add content in a different blocks, but no way to find a concrete example. 我在不同的论坛上看到我们可以在不同的块中添加内容,但无法找到具体的示例。

If you have a solution or some clues to do that, I'm interested :) 如果你有解决方案或一些线索,我很感兴趣:)

Best regards, Enes 最好的问候,Enes

The admin dashboard is a set of block. 管理仪表板是一组块。 So you have one block to display managed entities. 因此,您有一个块来显示托管实体。 If you want to display other information or other entities handled by your own mechanism you have to create a new block. 如果要显示由您自己的机制处理的其他信息或其他实体,则必须创建新块。

A block is handled by the SonataBlockBundle, the online documentation http://www.sonata-project.org/bundles/block/master/doc/index.html explains how to create a new block. 块由SonataBlockBundle处理,在线文档http://www.sonata-project.org/bundles/block/master/doc/index.html解释了如何创建新块。 Once the block is created, you can register it to the admin dashboard by editing the admin configuration section: https://github.com/sonata-project/sandbox/blob/2.3/app/config/sonata/sonata_admin.yml#L24-L28 创建块后,您可以通过编辑管理配置部分将其注册到管理仪表板: https//github.com/sonata-project/sandbox/blob/2.3/app/config/sonata/sonata_admin.yml#L24 -L28

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM