services.yaml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. # Put parameters here that don't need to change on each machine where the app is deployed
  2. # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
  3. parameters:
  4. password_encryption: '%env(APP_ENCRYPT_METHOD)%'
  5. secret: '%env(APP_SECRET)%'
  6. locale: '%env(APP_LOCALE)%'
  7. url_append: '%env(APP_URL_APPEND)%'
  8. installed: '%env(APP_INSTALLED)%'
  9. twig:
  10. form:
  11. resources:
  12. - 'GeneratorBundle::fields.html.twig'
  13. mailer_transport: smtp
  14. mailer_host: 127.0.0.1
  15. mailer_user: admin@example.com
  16. mailer_password: null
  17. course_info_is_not_editable: false
  18. sonata_media.cdn.host: '%url_append%/public/resource'
  19. sonata_page.varnish.command: 'if [ ! -r "/etc/varnish/secret" ]; then echo "VALID ERROR :/"; else varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 {{ COMMAND }} "{{ EXPRESSION }}"; fi;'
  20. router.request_context.base_url: '%url_append%'
  21. asset.request_context.base_path: '%url_append%'
  22. glide_config:
  23. source: 'oneup_flysystem.resources_filesystem'
  24. cache: 'oneup_flysystem.cache_resources_filesystem'
  25. #cache: 'var/cache/resource/'
  26. glide_media_filters:
  27. document_thumbnail_small:
  28. w: 500
  29. services:
  30. # default configuration for services in *this* file
  31. _defaults:
  32. autowire: true # Automatically injects dependencies in your services.
  33. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
  34. public: true # Allows optimizing the container by removing unused services; this also means
  35. # fetching services directly from the container via $container->get() won't work.
  36. # The best practice is to be explicit about your dependencies anyway.
  37. bind:
  38. $passwordEncrypt: '%password_encryption%'
  39. Chamilo\CoreBundle\Component\Utils\Glide:
  40. arguments:
  41. - {source: '@oneup_flysystem.resources_filesystem', cache: '@oneup_flysystem.cache_resources_filesystem'}
  42. - '%glide_media_filters%'
  43. # makes classes in src/ available to be used as services
  44. # this creates a service per class whose id is the fully-qualified class name
  45. _instanceof:
  46. Sylius\Bundle\ResourceBundle\Controller\ResourceController:
  47. autowire: false
  48. Chamilo\PageBundle\:
  49. resource: '../src/PageBundle/*'
  50. exclude: '../src/PageBundle/{Entity,Migrations,Tests}'
  51. public: true
  52. Vich\UploaderBundle\Naming\SubdirDirectoryNamer:
  53. public: true
  54. Chamilo\ThemeBundle\:
  55. autowire: true
  56. resource: '../src/ThemeBundle/*'
  57. exclude: '../src/ThemeBundle/{Entity,Migrations,Tests}'
  58. public: true
  59. Chamilo\ThemeBundle\Controller\ExceptionController:
  60. public: true
  61. arguments:
  62. $debug: '%kernel.debug%'
  63. Doctrine\ORM\EntityManager: "@doctrine.orm.default_entity_manager"
  64. chamilo_core.hook_factory:
  65. class: 'Chamilo\CoreBundle\Hook\HookFactory'
  66. # makes classes in src/ available to be used as services
  67. # this creates a service per class whose id is the fully-qualified class name
  68. AdminBundle\:
  69. resource: '../src/AdminBundle/*'
  70. # you can exclude directories or files
  71. # but if a service is unused, it's removed anyway
  72. exclude: '../src/AdminBundle/{ChamiloAdminBundle.php,Entity,Repository,Tests}'
  73. ClassificationBundle\:
  74. resource: '../src/ClassificationBundle/*'
  75. # you can exclude directories or files
  76. # but if a service is unused, it's removed anyway
  77. exclude: '../src/ClassificationBundle/{ChamiloClassificationBundle.php,Entity,Admin,Document,Repository,Tests}'
  78. ContactBundle\:
  79. resource: '../src/ContactBundle/*'
  80. # you can exclude directories or files
  81. # but if a service is unused, it's removed anyway
  82. exclude: '../src/ContactBundle/{ChamiloContactBundle.php,Entity,Admin,Controller,DependencyInjection,Form,Repository,Tests}'
  83. Chamilo\UserBundle\:
  84. resource: '../src/UserBundle/*'
  85. # you can exclude directories or files
  86. # but if a service is unused, it's removed anyway
  87. exclude: '../src/UserBundle/{Admin,ChamiloUserBundle.php,Security/FOSUBUserProvider.php,DependencyInjection,Form,EventListener,Entity,Repository}'
  88. chamilo_lti_utils:
  89. class: Chamilo\LtiBundle\Util\Utils
  90. arguments: ['@chamilo.settings.manager']
  91. sylius_settings:
  92. driver: doctrine/orm
  93. # Doctrine audit
  94. sonata_doctrine_orm_admin:
  95. audit:
  96. force: false # Audits are set in the admin.yml files with audit:true
  97. # Grid default template
  98. #apy_data_grid:
  99. # theme: ChamiloCoreBundle::grid.html.twig
  100. #
  101. # Course settings
  102. chamilo_course:
  103. driver: doctrine/orm
  104. # resources:
  105. # parameter:
  106. # classes:
  107. # model: Chamilo\CourseBundle\Entity\CCourseSetting
  108. # repository: Chamilo\CourseBundle\Repository\CCourseSettingRepository
  109. #doctrine_cache:
  110. # providers:
  111. # sylius_settings:
  112. # type: file_system
  113. # chamilo_settings:
  114. # type: file_system
  115. gregwar_captcha:
  116. width: 200
  117. height: 50
  118. length: 6
  119. imports:
  120. - {resource: ../src/CoreBundle/Resources/config/services.yml}
  121. - {resource: ../src/PageBundle/Resources/config/services.yml}
  122. - {resource: ../vendor/knplabs/doctrine-behaviors/config/orm-services.yml}
  123. #sylius_resource:
  124. # resources:
  125. # app.document:
  126. # templates: ChamiloCoreBundle:Document
  127. # classes:
  128. # controller: Chamilo\CoreBundle\Controller\ResourceController
  129. # model: Chamilo\CourseBundle\Entity\CDocument
  130. # repository: Chamilo\CoreBundle\Repository\ResourceRepository
  131. #sonata.media.provider.private:
  132. # class: Sonata\MediaBundle\Provider\FileProvider
  133. # tags:
  134. # - { name: sonata.media.provider }
  135. # arguments:
  136. # - 'sonata.media.provider.private'
  137. # - '@app.sonata.media.private.filesystem'
  138. # - '@sonata.media.cdn.server'
  139. # - '@sonata.media.generator.default'
  140. # - '@sonata.media.thumbnail.format'
  141. #
  142. #chamilo.sonata.media.private.filesystem:
  143. # class: Gaufrette\Filesystem
  144. # arguments: ['@chamilo.sonata.media.private.adapter']
  145. #
  146. #chamilo.sonata.media.private.adapter:
  147. # class: Sonata\MediaBundle\Filesystem\Local
  148. # arguments:
  149. # - "%kernel.root_dir%/../doclib/uploads"
  150. # - true