twig.xml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?xml version="1.0" ?>
  2. <container xmlns="http://symfony.com/schema/dic/services"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  5. <services>
  6. <service id="twig" class="Twig_Environment">
  7. <argument type="service" id="twig.loader" />
  8. <argument /> <!-- Twig options -->
  9. <call method="addGlobal">
  10. <argument>app</argument>
  11. <argument type="service" id="twig.app_variable" />
  12. </call>
  13. <call method="addRuntimeLoader">
  14. <argument type="service" id="twig.runtime_loader" />
  15. </call>
  16. <configurator service="twig.configurator.environment" method="configure" />
  17. </service>
  18. <service id="twig.app_variable" class="Symfony\Bridge\Twig\AppVariable" public="false">
  19. <call method="setEnvironment"><argument>%kernel.environment%</argument></call>
  20. <call method="setDebug"><argument>%kernel.debug%</argument></call>
  21. <call method="setTokenStorage"><argument type="service" id="security.token_storage" on-invalid="ignore" /></call>
  22. <call method="setRequestStack"><argument type="service" id="request_stack" on-invalid="ignore" /></call>
  23. </service>
  24. <service id="twig.cache_warmer" class="Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheCacheWarmer" public="false">
  25. <tag name="kernel.cache_warmer" />
  26. <argument type="service" id="service_container" />
  27. <argument type="service" id="templating.finder" on-invalid="ignore" />
  28. <argument type="collection" /> <!-- Twig paths -->
  29. </service>
  30. <service id="twig.template_iterator" class="Symfony\Bundle\TwigBundle\TemplateIterator" public="false">
  31. <argument type="service" id="kernel" />
  32. <argument>%kernel.root_dir%</argument>
  33. <argument type="collection" /> <!-- Twig paths -->
  34. </service>
  35. <service id="twig.template_cache_warmer" class="Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheWarmer" public="false">
  36. <tag name="kernel.cache_warmer" />
  37. <argument type="service" id="twig" />
  38. <argument type="service" id="twig.template_iterator" />
  39. </service>
  40. <service id="twig.loader.native_filesystem" class="Twig_Loader_Filesystem" public="false">
  41. <argument type="collection" /> <!-- paths -->
  42. <argument /> <!-- project's root dir -->
  43. </service>
  44. <service id="twig.loader.filesystem" class="Symfony\Bundle\TwigBundle\Loader\FilesystemLoader" public="false">
  45. <argument type="service" id="templating.locator" />
  46. <argument type="service" id="templating.name_parser" />
  47. <argument /> <!-- project's root dir -->
  48. <tag name="twig.loader"/>
  49. </service>
  50. <service id="twig.loader.chain" class="Twig_Loader_Chain" public="false"/>
  51. <service id="twig.loader" alias="twig.loader.filesystem" />
  52. <service id="templating.engine.twig" class="Symfony\Bundle\TwigBundle\TwigEngine" public="false">
  53. <argument type="service" id="twig" />
  54. <argument type="service" id="templating.name_parser" />
  55. <argument type="service" id="templating.locator" />
  56. </service>
  57. <service id="twig.extension.profiler" class="Symfony\Bridge\Twig\Extension\ProfilerExtension" public="false">
  58. <argument type="service" id="twig.profile" />
  59. <argument type="service" id="debug.stopwatch" on-invalid="null" />
  60. </service>
  61. <service id="twig.profile" class="Twig_Profiler_Profile" />
  62. <service id="data_collector.twig" class="Symfony\Bridge\Twig\DataCollector\TwigDataCollector" public="false">
  63. <tag name="data_collector" template="@WebProfiler/Collector/twig.html.twig" id="twig" priority="257" />
  64. <argument type="service" id="twig.profile" />
  65. </service>
  66. <service id="twig.extension.trans" class="Symfony\Bridge\Twig\Extension\TranslationExtension" public="false">
  67. <argument type="service" id="translator" />
  68. </service>
  69. <service id="twig.extension.assets" class="Symfony\Bridge\Twig\Extension\AssetExtension" public="false">
  70. <argument type="service" id="assets.packages" />
  71. </service>
  72. <service id="twig.extension.code" class="Symfony\Bridge\Twig\Extension\CodeExtension" public="false">
  73. <tag name="twig.extension" />
  74. <argument type="service" id="debug.file_link_formatter" on-invalid="ignore" />
  75. <argument>%kernel.root_dir%</argument>
  76. <argument>%kernel.charset%</argument>
  77. </service>
  78. <service id="twig.extension.routing" class="Symfony\Bridge\Twig\Extension\RoutingExtension" public="false">
  79. <argument type="service" id="router" />
  80. </service>
  81. <service id="twig.extension.yaml" class="Symfony\Bridge\Twig\Extension\YamlExtension" public="false" />
  82. <service id="twig.extension.debug.stopwatch" class="Symfony\Bridge\Twig\Extension\StopwatchExtension" public="false">
  83. <argument type="service" id="debug.stopwatch" on-invalid="ignore" />
  84. <argument>%kernel.debug%</argument>
  85. </service>
  86. <service id="twig.extension.expression" class="Symfony\Bridge\Twig\Extension\ExpressionExtension" public="false" />
  87. <service id="twig.extension.httpkernel" class="Symfony\Bridge\Twig\Extension\HttpKernelExtension" public="false" />
  88. <service id="twig.runtime.httpkernel" class="Symfony\Bridge\Twig\Extension\HttpKernelRuntime">
  89. <argument type="service" id="fragment.handler" />
  90. <tag name="twig.runtime" />
  91. </service>
  92. <service id="twig.extension.httpfoundation" class="Symfony\Bridge\Twig\Extension\HttpFoundationExtension" public="false">
  93. <argument type="service" id="request_stack" />
  94. <argument type="service" id="router.request_context" on-invalid="ignore" />
  95. </service>
  96. <service id="twig.extension.form" class="Symfony\Bridge\Twig\Extension\FormExtension" public="false">
  97. <argument type="collection">
  98. <argument type="service" id="service_container" />
  99. <argument>twig.form.renderer</argument>
  100. </argument>
  101. </service>
  102. <service id="twig.extension.debug" class="Twig_Extension_Debug" public="false" />
  103. <service id="twig.form.engine" class="Symfony\Bridge\Twig\Form\TwigRendererEngine" public="false">
  104. <argument>%twig.form.resources%</argument>
  105. <argument type="service" id="twig" />
  106. </service>
  107. <service id="twig.form.renderer" class="Symfony\Bridge\Twig\Form\TwigRenderer">
  108. <argument type="service" id="twig.form.engine" />
  109. <argument type="service" id="security.csrf.token_manager" on-invalid="null" />
  110. <tag name="twig.runtime" />
  111. </service>
  112. <service id="twig.translation.extractor" class="Symfony\Bridge\Twig\Translation\TwigExtractor">
  113. <argument type="service" id="twig" />
  114. <tag name="translation.extractor" alias="twig" />
  115. </service>
  116. <service id="twig.exception_listener" class="Symfony\Component\HttpKernel\EventListener\ExceptionListener">
  117. <tag name="kernel.event_subscriber" />
  118. <tag name="monolog.logger" channel="request" />
  119. <argument>%twig.exception_listener.controller%</argument>
  120. <argument type="service" id="logger" on-invalid="null" />
  121. </service>
  122. <service id="twig.controller.exception" class="Symfony\Bundle\TwigBundle\Controller\ExceptionController">
  123. <argument type="service" id="twig" />
  124. <argument>%kernel.debug%</argument>
  125. </service>
  126. <service id="twig.controller.preview_error" class="Symfony\Bundle\TwigBundle\Controller\PreviewErrorController">
  127. <argument type="service" id="http_kernel" />
  128. <argument>%twig.exception_listener.controller%</argument>
  129. </service>
  130. <service id="twig.configurator.environment" class="Symfony\Bundle\TwigBundle\DependencyInjection\Configurator\EnvironmentConfigurator" public="false">
  131. <argument /> <!-- date format, set in TwigExtension -->
  132. <argument /> <!-- interval format, set in TwigExtension -->
  133. <argument /> <!-- timezone, set in TwigExtension -->
  134. <argument /> <!-- decimals, set in TwigExtension -->
  135. <argument /> <!-- decimal point, set in TwigExtension -->
  136. <argument /> <!-- thousands separator, set in TwigExtension -->
  137. </service>
  138. <service id="twig.runtime_loader" class="Symfony\Bundle\TwigBundle\ContainerAwareRuntimeLoader" public="false">
  139. <argument type="service" id="service_container" />
  140. <argument type="collection" /> <!-- the mapping between class names and service names -->
  141. <argument type="service" id="logger" on-invalid="null" />
  142. </service>
  143. </services>
  144. </container>