我一直在寻找一种方法来覆盖基于主键的默认数据排序。
我从文档中找到了一些用于对数据进行排序的配置示例,但它不起作用。
它说
“easy_admin.list”下无法识别的选项“sort”
easy_admin:
entities:
Customer:
class: AppBundle\Entity\Customer
list:
sort: 'name'
form:
title: 'Add Customer'
form_options: {validation_groups:['Default']}
fields:
- name
- {property: 'gender', type: 'choice', type_options:
{
placeholder: 'Select your gender',
choices: {
Female: 'female',
Male: 'male'
}
} }
- {property: 'birthdate', type: 'date', type_options: {widget: 'single_text'}}
- isActive
new:
form_options: {validation_groups: ['Default','Customer']}
edit:
title: 'Edit Customer'
site_name: 'Premiere Sales'