advance.rst 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. Advance
  2. =======
  3. By default services who are injected to an admin instance are
  4. ======================== =============================================
  5. method name Service Id
  6. ======================== =============================================
  7. model_manager sonata.admin.manager.%manager-type%
  8. form_contractor sonata.admin.builder.%manager-type%_form
  9. show_builder sonata.admin.builder.%manager-type%_show
  10. list_builder sonata.admin.builder.%manager-type%_list
  11. datagrid_builder sonata.admin.builder.%manager-type%_datagrid
  12. translator translator
  13. configuration_pool sonata.admin.pool
  14. router router
  15. validator validator
  16. security_handler sonata.admin.security.handler
  17. Note: %manager-type% is replace by the manager type (orm, odm...)
  18. If you want to modify the service who are going to be injected, add the following code to your
  19. application's config file:
  20. .. code-block:: yaml
  21. # app/config/config.yml
  22. admins:
  23. sonata_admin: #method name, you can find the list in the table above
  24. sonata.order.admin.order: #id of the admin service's
  25. model_manager: sonata.order.admin.order.manager #id of the your service