advance.rst 1.2 KB

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