symfony doctrine admin generator sort by virtual columns

我怕爱的太早我们不能终老 提交于 2019-12-23 03:28:33

问题


I'm working with the Symfony doctrine admin generator.

I've added a couple of virtual columns as detailed on this page http://www.symfony-project.org/jobeet/1_4/Doctrine/en/12

What I want to be able to do is sort my list based on those virtual columns.

http://redotheweb.com/2008/09/25/sorting-by-custom-column-in-the-symfony-admin-generator/

That is how to do it with the Propel plugin but that details the use of a "sort_method" configuration in the yaml generator file, no such configuration item exists for the Doctrine admin generator.

Just wonder if there is something I'm missing? Thanks


回答1:


Looks like I need to use this plugin:

http://www.symfony-project.org/plugins/DbFinderPlugin

It's this plugin that gives the "sort_method" configuration ability.

Hmmm, seems like a lot of work for something as simple as sorting by a different column.



来源:https://stackoverflow.com/questions/4899628/symfony-doctrine-admin-generator-sort-by-virtual-columns

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!