Restrict objects available in symfony admin generator for all actions
-
07-11-2019 - |
質問
One can change the query that is used for the list action in an admin generator configuration by using the table_method
option. For example,
# apps/backend/modules/job/config/generator.yml
config:
list:
table_method: retrieveBackendJobList
But I want to restrict all the actions in the admin generator. In particular, I want to restrict all the objects displayed, edited, deleted, etc., to objects that have a particular attribute that may depend on the current day of the week or the time of the day.
I don't want to override the model class because for other apps I want the restriction to be different (or perhaps no restriction at all).
Where (i.e., which file(s)) and how can I make this change?
正しい解決策はありません
所属していません StackOverflow