How to change default entity order in SonataAdminBundle for list action?
answer :) add this to your admin class
protected $datagri
It is better not to override constructor.
But you can override the Admin::configure()
method and set some element of the datagridValues
array.
See in example:
public function configure()
{
parent::configure();
$this->datagridValues['_sort_by'] = 'name';
$this->datagridValues['_sort_order'] = 'DESC';
}