Reputation: 167
How i can make 2 admins for one entity in Sonata Admin?
For example - one admin shows a list with "status=1"
condition, and other with "status=2".
it would be great if make a new record in first admin automatically sets the "status=1".
Thx.
Upvotes: 2
Views: 937
Reputation: 522
1) create a one admin class in ADMIN Directory with Your condition status=1
2) create a second admin class in ADMIN Directory with Your condition status=2
3) config that class in sonata_admin.yaml with different name
4) change in second admin $baseRouteName
and $baseRoutePattern
to different
In which Entity name is same
Upvotes: 5