config.yml.template 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. imports:
  2. - { resource: parameters.yml }
  3. - { resource: security.yml }
  4. framework:
  5. #esi: ~
  6. #translator: { fallback: %locale% }
  7. default_locale: fr
  8. secret: %secret%
  9. router:
  10. strict_requirements: %kernel.debug%
  11. resource: "%kernel.root_dir%/config/routing.yml"
  12. trusted_proxies: false
  13. form: true
  14. csrf_protection: true
  15. validation:
  16. enable_annotations: true
  17. # annotations:
  18. # namespaces:
  19. # Muzich: Muzich\CoreBundle\Validator\
  20. templating: { engines: ['twig'] } #assets_version: SomeVersionScheme
  21. session:
  22. # 14 jours
  23. cookie_lifetime: 1209600
  24. #cookie_path: \
  25. #cookie_domain: example.com
  26. #cookie_secure: true
  27. #cookie_httponly: true
  28. translator: { fallback: fr }
  29. fos_facebook:
  30. #file: %kernel.root_dir%/../vendor/facebook/php-sdk/src/base_facebook.php
  31. alias: facebook
  32. app_id: %api_facebook_id%
  33. secret: %api_facebook_secret%
  34. cookie: true
  35. permissions: [email]
  36. #permissions: [email, user_location]
  37. services:
  38. core.twig.extension:
  39. class: Muzich\CoreBundle\Twig\Extensions\MyTwigExtension
  40. tags:
  41. - { name: twig.extension }
  42. arguments:
  43. - "@translator"
  44. - %twig_extension_parameters%
  45. - "@service_container"
  46. muzich.security.authentication.success_handler:
  47. class: %muzich.security.authentication.success_handler.class%
  48. public: false
  49. arguments: ['@router', '@doctrine.orm.entity_manager']
  50. muzich.security.authentication.failure_handler:
  51. class: %muzich.security.authentication.failure_handler.class%
  52. public: false
  53. arguments: ['@router', '@doctrine.orm.entity_manager', '@translator']
  54. muzich_user_manager:
  55. class: Muzich\UserBundle\Entity\UserManager
  56. arguments:
  57. - "@security.encoder_factory"
  58. #- "%fos_user.encoder.algorithm%"
  59. - "@fos_user.util.username_canonicalizer"
  60. - "@fos_user.util.email_canonicalizer"
  61. - "@fos_user.entity_manager"
  62. - "%fos_user.model.user.class%"
  63. muzich.manager.playlist:
  64. class: Muzich\CoreBundle\Managers\PlaylistManager
  65. arguments:
  66. - "@doctrine.orm.entity_manager"
  67. muzich.mining.tag.miner:
  68. class: Muzich\CoreBundle\Mining\Tag\TagMiner
  69. arguments:
  70. - "@doctrine.orm.entity_manager"
  71. - "@doctrine_mongodb"
  72. muzich.mining.tag.data:
  73. class: Muzich\CoreBundle\Mining\Tag\TagData
  74. arguments:
  75. - "@doctrine.orm.entity_manager"
  76. - "@doctrine_mongodb"
  77. my_user.facebook_provider:
  78. class: %my_user.facebook_provider.class%
  79. arguments:
  80. - "@fos_facebook.api"
  81. - "@muzich_user_manager"
  82. - "@validator"
  83. - "@service_container"
  84. - "%my_user.facebook_provider.class%"
  85. muzich_tag_manager:
  86. class: Muzich\CoreBundle\Managers\TagManager
  87. arguments:
  88. - "@fos_user.util.username_canonicalizer"
  89. muzich_user.registration.form.type:
  90. class: Muzich\UserBundle\Form\Type\RegistrationFormType
  91. arguments: [%fos_user.model.user.class%]
  92. tags:
  93. - { name: form.type, alias: muzich_user_registration }
  94. muzich_user.registration.form.handler:
  95. class: Muzich\UserBundle\Form\Handler\RegistrationFormHandler
  96. arguments:
  97. - "@fos_user.registration.form"
  98. - "@request"
  99. - "@fos_user.user_manager"
  100. - "@fos_user.mailer"
  101. - "@fos_user.util.token_generator"
  102. - "@translator"
  103. - "@doctrine"
  104. scope: request
  105. public: false
  106. tags:
  107. - { name: muzich_user_registration_form_handler }
  108. # validateurs
  109. validator.tags:
  110. class: Muzich\CoreBundle\Validator\TagsValidator
  111. arguments: ["@doctrine.orm.entity_manager"]
  112. tags:
  113. - { name: validator.constraint_validator, alias: validator.tags }
  114. validator.groupownedorpublic:
  115. class: Muzich\CoreBundle\Validator\GroupOwnedOrPublicValidator
  116. arguments: ["@doctrine.orm.entity_manager", "@security.context"]
  117. tags:
  118. - { name: validator.constraint_validator, alias: validator.groupownedorpublic }
  119. #
  120. muzich_strict_canonicalizer:
  121. class: Muzich\CoreBundle\Util\StrictCanonicalizer
  122. public: false
  123. admingenerator.menu.moderation:
  124. class: %admingenerator.menu_builder.class%
  125. factory_service: admingenerator.menu_builder
  126. factory_method: createModerationMenu
  127. arguments: ["@request"]
  128. scope: request
  129. tags:
  130. - { name: knp_menu.menu, alias: moderation }
  131. muzich.socialBarHelper:
  132. class: Muzich\CoreBundle\Templating\Helper\SocialBarHelper
  133. tags:
  134. - { name: templating.helper, alias: social-buttons }
  135. arguments:
  136. - "@templating"
  137. twig.extension.muzich_social_bar:
  138. class: Muzich\CoreBundle\Twig\Extensions\MuzichTwigSocialBar
  139. tags:
  140. - { name: twig.extension }
  141. arguments:
  142. - "@service_container"
  143. - "@translator"
  144. #sonata_admin:
  145. # #security_handler: sonata.admin.security.handler.acl
  146. # security_handler: sonata.admin.security.handler.noop
  147. ## dashboard_groups:
  148. ## muzich:
  149. ## items:
  150. ## - muzich.admin.element
  151. # Twig Configuration
  152. twig:
  153. debug: %kernel.debug%
  154. strict_variables: %kernel.debug%
  155. globals:
  156. cloud_tags_limit_to_display : %tag_cloud_limit_display%
  157. player_config_youtube_width : %youtube_player_width%
  158. player_config_youtube_height : %youtube_player_height%
  159. playlist_tags_count_displayed_max : %playlist_tags_count_displayed_max%
  160. form:
  161. resources:
  162. - "ShtumiUsefulBundle::fields.html.twig"
  163. shtumi_useful:
  164. autocomplete_entities:
  165. users:
  166. class: MuzichCoreBundle:User
  167. role: ROLE_ADMIN
  168. property: slug
  169. search: contains
  170. tags:
  171. class: MuzichCoreBundle:Tag
  172. property: slug
  173. search: contains
  174. groups:
  175. class: MuzichCoreBundle:Group
  176. property: slug
  177. search: contains
  178. elements:
  179. class: MuzichCoreBundle:Element
  180. property: name
  181. search: contains
  182. admingenerator_generator:
  183. # choose only one
  184. use_propel: false
  185. use_doctrine_orm: true
  186. use_doctrine_odm: false
  187. # choose and uncomment only one
  188. # base_admin_template: AdmingeneratorGeneratorBundle::base_admin.html.twig
  189. base_admin_template: MuzichAdminBundle::base_admin_assetic_less.html.twig
  190. dashboard_welcome_path: AdmingeneratorDashboard_welcome
  191. knp_menu:
  192. twig:
  193. template: AdmingeneratorGeneratorBundle:KnpMenu:knp_menu_trans.html.twig
  194. jms_security_extra:
  195. expressions: true
  196. # Assetic Configuration
  197. assetic:
  198. debug: %kernel.debug%
  199. use_controller: false
  200. bundles:
  201. - "MuzichCoreBundle"
  202. java: "/usr/bin/java"
  203. filters:
  204. cssrewrite: ~
  205. # closure:
  206. # jar: %kernel.root_dir%/java/compiler.jar
  207. # yui_css:
  208. # jar: %kernel.root_dir%/java/yuicompressor-2.4.2.jar
  209. yui_css:
  210. jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.8pre.jar"
  211. yui_js:
  212. jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.8pre.jar"
  213. # Doctrine Configuration
  214. doctrine:
  215. dbal:
  216. driver: %database_driver%
  217. host: %database_host%
  218. port: %database_port%
  219. dbname: %database_name%
  220. user: %database_user%
  221. password: %database_password%
  222. charset: utf8
  223. orm:
  224. auto_generate_proxy_classes: %kernel.debug%
  225. auto_mapping: true
  226. doctrine_mongodb:
  227. connections:
  228. default:
  229. server: mongodb://10.6.0.4:27017
  230. options: {}
  231. default_database: muzichmdb
  232. document_managers:
  233. default:
  234. auto_mapping: true
  235. # Swiftmailer Configuration
  236. swiftmailer:
  237. transport: smtp
  238. username: secret
  239. password: secret
  240. host: in-v3.mailjet.com
  241. port: 587
  242. encryption: tls
  243. auth_mode: login
  244. #spool: { type: memory } # conflict with monolog sending emails
  245. stof_doctrine_extensions:
  246. default_locale: fr_FR
  247. # orm:
  248. # tree: true
  249. # timestampable: false
  250. fos_user:
  251. db_driver: orm
  252. firewall_name: main
  253. use_listener: false
  254. user_class: Muzich\CoreBundle\Entity\User
  255. from_email:
  256. address: contact@muzi.ch
  257. sender_name: Muzi.ch
  258. # encoder:
  259. # algorithm: sha512
  260. # encode_as_base64: false
  261. # iterations: 10
  262. service:
  263. user_manager: muzich_user_manager
  264. username_canonicalizer: muzich_strict_canonicalizer
  265. registration:
  266. form:
  267. type: muzich_user_registration
  268. handler: muzich_user.registration.form.handler
  269. resetting:
  270. email:
  271. template: MuzichUserBundle:User:resetting.email.twig
  272. gregwar_image: ~
  273. parameters:
  274. supported_langs:
  275. - fr
  276. - en
  277. test.client.class: Muzich\CoreBundle\lib\Test\Client
  278. admingenerator.menu_builder.class: Muzich\AdminBundle\Menu\MenuBuilder
  279. muzich.security.authentication.success_handler.class: Muzich\CoreBundle\Security\Http\Authentication\AuthenticationSuccessHandler
  280. muzich.security.authentication.failure_handler.class: Muzich\CoreBundle\Security\Http\Authentication\AuthenticationFailureHandler
  281. my_user.facebook_provider.class: Muzich\CoreBundle\Security\User\Provider\FacebookProvider
  282. # Ce siteurl permet au str_replace de changeLanguage d'obtenir l'url
  283. siteurl: https://muzi.ch
  284. siteurl_www: https://www.muzi.ch
  285. emails_from: contact@muzi.ch
  286. emails_from_name: Muzi.ch
  287. sitebase: /home/bux/projets/muzich/
  288. video_embed_config_file: src/Muzich/CoreBundle/Resources/config/video_embed.yaml
  289. video_embed_debug: true
  290. search_default_count: 10
  291. search_ajax_more: 10
  292. search_default_favorites_tags_count: 999
  293. comment_add_min_length: 3
  294. comment_add_max_length: 512
  295. tag_add_min_length: 2
  296. tag_add_max_length: 64
  297. changeemail_security_delay: 3600
  298. playlist_tags_count_displayed_max: 7
  299. soundcloud_player_height: 81
  300. jamendo_player_width: 200
  301. jamendo_player_height: 300
  302. youtube_player_width: 590
  303. youtube_player_height: 300
  304. vimeo_player_width: 590
  305. vimeo_player_height: 300
  306. dailymotion_player_width: 590
  307. dailymotion_player_height: 300
  308. deezer_player_width: 590
  309. deezer_player_height: 200
  310. tag_cloud_limit_display: 40
  311. factories:
  312. - youtube.com
  313. - youtu.be
  314. - dailymotion.com
  315. - soundcloud.com
  316. - snd.sc
  317. - jamendo.com
  318. - deezer.com
  319. - vimeo.com
  320. - spotify.com
  321. - mixcloud.com
  322. autoplay_sites_enabled:
  323. - youtube.com
  324. - youtu.be
  325. - soundcloud.com
  326. - snd.sc
  327. - jamendo.com
  328. twig_extension_parameters:
  329. autoplay_sites_enabled: %autoplay_sites_enabled%
  330. autoplay_contexts:
  331. - home
  332. - show
  333. - show_user
  334. - show_group
  335. - favorite
  336. - favorite_user
  337. - favorite_my
  338. autoplay_max_elements: 256
  339. reputation_element_point_value: 1
  340. reputation_element_favorite_value: 5
  341. reputation_element_follow_value: 10
  342. reputation_element_tags_element_prop_value: 12
  343. reputation_element_added_to_playlist: 1
  344. search_global_elements_word_min_length: 3
  345. email_confirmation_email_interval: 3600