configuration.rst 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. Configuration
  2. =============
  3. Configuration options
  4. * ``security``
  5. * ``handler``
  6. * ``sonata.admin.security.handler.role`` : The default value
  7. * ``sonata.admin.security.handler.acl`` : Use this service if you want ACL
  8. * ``title`` : The admin's title, can be the client name for instance (default: Sonata Admin)
  9. * ``title_logo`` : logo to use, must be an image with a height of 28px (default : bundles/sonataadmin/logo_title.png)
  10. Please see :doc:`templates` for more information on how to configure default templates.
  11. Full Configuration Options
  12. --------------------------
  13. .. code-block:: yaml
  14. sonata_admin:
  15. security:
  16. handler: sonata.admin.security.handler.role
  17. acl_user_manager: fos_user.user_manager # Name of the user manager service used to retrieve ACL users
  18. title: Sonata Project
  19. title_logo: bundles/sonataadmin/logo_title.png
  20. options:
  21. html5_validate: false # does not use html5 validation
  22. confirm_exit: false # disable confirmation when quitting with unsaved changes
  23. templates:
  24. # default global templates
  25. layout: SonataAdminBundle::standard_layout.html.twig
  26. ajax: SonataAdminBundle::ajax_layout.html.twig
  27. dashboard: SonataAdminBundle:Core:dashboard.html.twig
  28. # default values of actions templates, they should extend global templates
  29. list: SonataAdminBundle:CRUD:list.html.twig
  30. show: SonataAdminBundle:CRUD:show.html.twig
  31. edit: SonataAdminBundle:CRUD:edit.html.twig
  32. history: SonataAdminBundle:CRUD:history.html.twig
  33. preview: SonataAdminBundle:CRUD:preview.html.twig
  34. delete: SonataAdminBundle:CRUD:delete.html.twig
  35. batch: SonataAdminBundle:CRUD:list__batch.html.twig
  36. batch_confirmation: SonataAdminBundle:CRUD:batch_confirmation.html.twig
  37. # list related templates
  38. inner_list_row: SonataAdminBundle:CRUD:list_inner_row.html.twig
  39. base_list_field: SonataAdminBundle:CRUD:base_list_field.html.twig
  40. # default values of helper templates
  41. short_object_description: SonataAdminBundle:Helper:short-object-description.html.twig
  42. # default values of block templates, they should extend the base_block template
  43. list_block: SonataAdminBundle:Block:block_admin_list.html.twig
  44. dashboard:
  45. blocks:
  46. # display a dashboard block
  47. - { position: left, type: sonata.admin.block.admin_list }
  48. # Customize this part to add new block configuration
  49. - { position: right, type: sonata.block.service.text, settings: { content: "<h2>Welcome to the Sonata Admin</h2> <p>This is a <code>sonata.block.service.text</code> from the Block Bundle, you can create and add new block in these area by configuring the <code>sonata_admin</code> section.</p> <br /> For instance, here a RSS feed parser (<code>sonata.block.service.rss</code>):"} }
  50. - { position: right, type: sonata.block.service.rss, settings: { title: Sonata Project's Feeds, url: http://sonata-project.org/blog/archive.rss }}
  51. # set to true to persist filter settings per admin module in the user's session
  52. persist_filters: false
  53. sonata_block:
  54. default_contexts: [cms]
  55. blocks:
  56. sonata.admin.block.admin_list:
  57. contexts: [admin]