configuration.rst 3.2 KB

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