Created
December 12, 2013 02:43
-
-
Save chrisyue/7922459 to your computer and use it in GitHub Desktop.
symfony sonata admin add default filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getFilterParameters() | |
{ | |
$default = [ | |
'isAudited' => ['value' => 2], | |
]; | |
$this->datagridValues = array_merge($default, $this->datagridValues); | |
return parent::getFilterParameters(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For those coming from Google, if you want to set the default values for datagrid filters, see this - https://sonata-project.org/bundles/admin/master/doc/reference/action_list.html#default-filters