symfony doctrine管理生成器按虚拟列排序 [英] symfony doctrine admin generator sort by virtual columns

查看:147
本文介绍了symfony doctrine管理生成器按虚拟列排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经添加了几个虚拟列,详见本页 http://www.symfony-project.org/jobeet/1_4/Doctrine/en/12



我想要做的是根据这些虚拟列对我的列表进行排序。



< a href =http://redotheweb.com/2008/09/25/sorting-by-custom-column-in-the-symfony-admin-generator/ =nofollow> http://redotheweb.com / 2008/09/25 / sort-by-custom-column-in-the-symfony-admin-generator /



这是怎么做的使用Propel插件,但是详细说明了在yaml生成器文件中使用sort_method配置,Doctrine管理生成器不存在此类配置项。



只是想知道有没有我错过的东西?感谢

解决方案

看起来我需要使用这个插件:



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



这个插件提供了sort_method配置功能。<​​/ p>

嗯,好像很多工作就像简单按不同列排序。


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

解决方案

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.

这篇关于symfony doctrine管理生成器按虚拟列排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆