How can i set default result in Symfony Filters in Admin Generator?
I generated backend and i have list all results, for example with News.
I would like default in this view (list) have for example groups = 'news'.
I can add for generator.yml table_method (for list) and for model additional query.
This working ok. Show me only groups news, but if i use filter and select all groups then still i have only groups ‘news’. Is possible that default view (immediately after the entry the module news) showing only with groups = 'news', and if i use filter then reset this query?
Maybe instead of additional query can call filter with this option? i can set default value in select list with groups, but this set in javascript, not performed. I must click button Filter.
thanks for help!
You can add in
myclassGeneratorConfigurationclass that is in myproject/apps/backend/modules/mymodule/lib folder a method to set filter defaults: