[英]Customize Download in the list view Sonata Admin
All you have to do right now is override the getExportFormats
method of your admin, so that it returns the list of formats that you really want. 现在,您要做的就是覆盖管理员的getExportFormats
方法,以便它返回您真正想要的格式列表。
In the future, you will be able to configure that globally thanks to this contribution I made . 将来,由于我所做的贡献 ,您将能够在全局范围内进行配置。
If you also want to change the button to a link, you need to override the list template, and customize the table_footer
block (the template to override is vendor/sonata-project/admin-bundle/Resources/views/CRUD/base_list.html.twig
), so just copy/paste and adapt the table_footer
block. 如果您还想将按钮更改为链接,则需要覆盖列表模板,并自定义table_footer
块(要覆盖的模板是vendor/sonata-project/admin-bundle/Resources/views/CRUD/base_list.html.twig
),因此只需复制/粘贴并修改table_footer
块。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.