configuration.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. Configuration
  2. =============
  3. .. note::
  4. This page will be removed soon, as it's content is being improved and moved to
  5. other pages of the documentation. Please refer to each section's documentation for up-to-date
  6. information on SonataAdminBundle configuration options.
  7. Configuration
  8. -------------
  9. Configuration options
  10. .. configuration-block::
  11. .. code-block:: yaml
  12. # app/config/config.yml
  13. sonata_admin:
  14. security:
  15. # the default value
  16. handler: sonata.admin.security.handler.role
  17. # use this service if you want ACL
  18. handler: sonata.admin.security.handler.acl
  19. Full Configuration Options
  20. --------------------------
  21. .. configuration-block::
  22. .. code-block:: yaml
  23. # Default configuration for extension with alias: "sonata_admin"
  24. sonata_admin:
  25. security:
  26. handler: sonata.admin.security.handler.noop
  27. information:
  28. # Prototype
  29. id: []
  30. admin_permissions:
  31. # Defaults:
  32. - CREATE
  33. - LIST
  34. - DELETE
  35. - UNDELETE
  36. - EXPORT
  37. - OPERATOR
  38. - MASTER
  39. object_permissions:
  40. # Defaults:
  41. - VIEW
  42. - EDIT
  43. - DELETE
  44. - UNDELETE
  45. - OPERATOR
  46. - MASTER
  47. - OWNER
  48. acl_user_manager: null
  49. title: 'Sonata Admin'
  50. title_logo: bundles/sonataadmin/logo_title.png
  51. options:
  52. html5_validate: true
  53. # Auto order groups and admins by label or id
  54. sort_admins: false
  55. confirm_exit: true
  56. use_select2: true
  57. use_icheck: true
  58. use_bootlint: false
  59. use_stickyforms: true
  60. pager_links: null
  61. form_type: standard
  62. dropdown_number_groups_per_colums: 2
  63. title_mode: ~ # One of "single_text"; "single_image"; "both"
  64. # Enable locking when editing an object, if the corresponding object manager supports it.
  65. lock_protection: false
  66. # Enable automatic registration of annotations with JMSDiExtraBundle
  67. enable_jms_di_extra_autoregistration: true
  68. dashboard:
  69. groups:
  70. # Prototype
  71. id:
  72. label: ~
  73. label_catalogue: ~
  74. icon: '<i class="fa fa-folder"></i>'
  75. provider: ~
  76. items:
  77. admin: ~
  78. label: ~
  79. route: ~
  80. route_params: []
  81. item_adds: []
  82. roles: []
  83. blocks:
  84. type: ~
  85. roles: []
  86. settings:
  87. # Prototype
  88. id: ~
  89. position: right
  90. class: col-md-4
  91. admin_services:
  92. model_manager: null
  93. form_contractor: null
  94. show_builder: null
  95. list_builder: null
  96. datagrid_builder: null
  97. translator: null
  98. configuration_pool: null
  99. route_generator: null
  100. validator: null
  101. security_handler: null
  102. label: null
  103. menu_factory: null
  104. route_builder: null
  105. label_translator_strategy: null
  106. pager_type: null
  107. templates:
  108. form: []
  109. filter: []
  110. view:
  111. # Prototype
  112. id: ~
  113. templates:
  114. user_block: 'SonataAdminBundle:Core:user_block.html.twig'
  115. add_block: 'SonataAdminBundle:Core:add_block.html.twig'
  116. layout: 'SonataAdminBundle::standard_layout.html.twig'
  117. ajax: 'SonataAdminBundle::ajax_layout.html.twig'
  118. dashboard: 'SonataAdminBundle:Core:dashboard.html.twig'
  119. search: 'SonataAdminBundle:Core:search.html.twig'
  120. list: 'SonataAdminBundle:CRUD:list.html.twig'
  121. filter: 'SonataAdminBundle:Form:filter_admin_fields.html.twig'
  122. show: 'SonataAdminBundle:CRUD:show.html.twig'
  123. show_compare: 'SonataAdminBundle:CRUD:show_compare.html.twig'
  124. edit: 'SonataAdminBundle:CRUD:edit.html.twig'
  125. preview: 'SonataAdminBundle:CRUD:preview.html.twig'
  126. history: 'SonataAdminBundle:CRUD:history.html.twig'
  127. acl: 'SonataAdminBundle:CRUD:acl.html.twig'
  128. history_revision_timestamp: 'SonataAdminBundle:CRUD:history_revision_timestamp.html.twig'
  129. action: 'SonataAdminBundle:CRUD:action.html.twig'
  130. select: 'SonataAdminBundle:CRUD:list__select.html.twig'
  131. list_block: 'SonataAdminBundle:Block:block_admin_list.html.twig'
  132. search_result_block: 'SonataAdminBundle:Block:block_search_result.html.twig'
  133. short_object_description: 'SonataAdminBundle:Helper:short-object-description.html.twig'
  134. delete: 'SonataAdminBundle:CRUD:delete.html.twig'
  135. batch: 'SonataAdminBundle:CRUD:list__batch.html.twig'
  136. batch_confirmation: 'SonataAdminBundle:CRUD:batch_confirmation.html.twig'
  137. inner_list_row: 'SonataAdminBundle:CRUD:list_inner_row.html.twig'
  138. outer_list_rows_mosaic: 'SonataAdminBundle:CRUD:list_outer_rows_mosaic.html.twig'
  139. outer_list_rows_list: 'SonataAdminBundle:CRUD:list_outer_rows_list.html.twig'
  140. outer_list_rows_tree: 'SonataAdminBundle:CRUD:list_outer_rows_tree.html.twig'
  141. base_list_field: 'SonataAdminBundle:CRUD:base_list_field.html.twig'
  142. pager_links: 'SonataAdminBundle:Pager:links.html.twig'
  143. pager_results: 'SonataAdminBundle:Pager:results.html.twig'
  144. tab_menu_template: 'SonataAdminBundle:Core:tab_menu_template.html.twig'
  145. knp_menu_template: 'SonataAdminBundle:Menu:sonata_menu.html.twig'
  146. assets:
  147. stylesheets:
  148. # Defaults:
  149. - bundles/sonatacore/vendor/bootstrap/dist/css/bootstrap.min.css
  150. - bundles/sonatacore/vendor/components-font-awesome/css/font-awesome.min.css
  151. - bundles/sonatacore/vendor/ionicons/css/ionicons.min.css
  152. - bundles/sonataadmin/vendor/admin-lte/dist/css/AdminLTE.min.css
  153. - bundles/sonataadmin/vendor/admin-lte/dist/css/skins/skin-black.min.css
  154. - bundles/sonataadmin/vendor/iCheck/skins/square/blue.css
  155. - bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css
  156. - bundles/sonataadmin/vendor/jqueryui/themes/base/jquery-ui.css
  157. - bundles/sonatacore/vendor/select2/select2.css
  158. - bundles/sonatacore/vendor/select2-bootstrap-css/select2-bootstrap.min.css
  159. - bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css
  160. - bundles/sonataadmin/css/styles.css
  161. - bundles/sonataadmin/css/layout.css
  162. - bundles/sonataadmin/css/tree.css
  163. - bundles/sonataadmin/css/colors.css
  164. javascripts:
  165. # Defaults:
  166. - bundles/sonatacore/vendor/jquery/dist/jquery.min.js
  167. - bundles/sonataadmin/vendor/jquery.scrollTo/jquery.scrollTo.min.js
  168. - bundles/sonatacore/vendor/moment/min/moment.min.js
  169. - bundles/sonataadmin/vendor/jqueryui/ui/minified/jquery-ui.min.js
  170. - bundles/sonataadmin/vendor/jqueryui/ui/minified/i18n/jquery-ui-i18n.min.js
  171. - bundles/sonatacore/vendor/bootstrap/dist/js/bootstrap.min.js
  172. - bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js
  173. - bundles/sonataadmin/vendor/jquery-form/jquery.form.js
  174. - bundles/sonataadmin/jquery/jquery.confirmExit.js
  175. - bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.min.js
  176. - bundles/sonatacore/vendor/select2/select2.min.js
  177. - bundles/sonataadmin/vendor/admin-lte/dist/js/app.min.js
  178. - bundles/sonataadmin/vendor/iCheck/icheck.min.js
  179. - bundles/sonataadmin/vendor/slimScroll/jquery.slimscroll.min.js
  180. - bundles/sonataadmin/vendor/waypoints/lib/jquery.waypoints.min.js
  181. - bundles/sonataadmin/vendor/waypoints/lib/shortcuts/sticky.min.js
  182. - bundles/sonataadmin/Admin.js
  183. - bundles/sonataadmin/treeview.js
  184. extensions:
  185. # Prototype
  186. id:
  187. admins: []
  188. excludes: []
  189. implements: []
  190. extends: []
  191. instanceof: []
  192. uses: []
  193. persist_filters: false
  194. show_mosaic_button: true
  195. global_search:
  196. show_empty_boxes: show