configuration.rst 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. .. configuration-block::
  14. .. code-block:: yaml
  15. sonata_admin:
  16. security:
  17. handler: sonata.admin.security.handler.role
  18. acl_user_manager: fos_user.user_manager # Name of the user manager service used to retrieve ACL users
  19. title: Sonata Project
  20. title_logo: bundles/sonataadmin/logo_title.png
  21. options:
  22. html5_validate: false # does not use html5 validation
  23. confirm_exit: false # disable confirmation when quitting with unsaved changes
  24. templates:
  25. # default global templates
  26. layout: SonataAdminBundle::standard_layout.html.twig
  27. ajax: SonataAdminBundle::ajax_layout.html.twig
  28. dashboard: SonataAdminBundle:Core:dashboard.html.twig
  29. # default values of actions templates, they should extend global templates
  30. list: SonataAdminBundle:CRUD:list.html.twig
  31. show: SonataAdminBundle:CRUD:show.html.twig
  32. edit: SonataAdminBundle:CRUD:edit.html.twig
  33. history: SonataAdminBundle:CRUD:history.html.twig
  34. preview: SonataAdminBundle:CRUD:preview.html.twig
  35. delete: SonataAdminBundle:CRUD:delete.html.twig
  36. batch: SonataAdminBundle:CRUD:list__batch.html.twig
  37. batch_confirmation: SonataAdminBundle:CRUD:batch_confirmation.html.twig
  38. # list related templates
  39. inner_list_row: SonataAdminBundle:CRUD:list_inner_row.html.twig
  40. base_list_field: SonataAdminBundle:CRUD:base_list_field.html.twig
  41. # default values of helper templates
  42. short_object_description: SonataAdminBundle:Helper:short-object-description.html.twig
  43. # default values of block templates, they should extend the base_block template
  44. list_block: SonataAdminBundle:Block:block_admin_list.html.twig
  45. dashboard:
  46. blocks:
  47. # display a dashboard block
  48. - { position: left, type: sonata.admin.block.admin_list }
  49. # Customize this part to add new block configuration
  50. - { 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>):"} }
  51. - { position: right, type: sonata.block.service.rss, settings: { title: Sonata Project's Feeds, url: http://sonata-project.org/blog/archive.rss }}
  52. # set to true to persist filter settings per admin module in the user's session
  53. persist_filters: false
  54. sonata_block:
  55. default_contexts: [cms]
  56. blocks:
  57. sonata.admin.block.admin_list:
  58. contexts: [admin]