Symfony2 : Sort / Order a translated entity form field?

后端 未结 3 829
刺人心
刺人心 2021-01-14 11:00

I am trying to order an entity form field witch is translated.

I am using the symfony translation tool, so i can\'t order values with a SQL statement. Is there a way

3条回答
  •  醉梦人生
    2021-01-14 11:06

    If your countries are in an array, just use the sort() function, with the SORT_STRING flag. You will do some gymnastic to have it in my opinion. Check this doc : http://php.net/manual/fr/function.sort.php

提交回复
热议问题