fragment_renderer.xml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. <parameters>
  6. <parameter key="fragment.handler.class">Symfony\Component\HttpKernel\DependencyInjection\LazyLoadingFragmentHandler</parameter>
  7. <parameter key="fragment.renderer.inline.class">Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer</parameter>
  8. <parameter key="fragment.renderer.hinclude.class">Symfony\Component\HttpKernel\Fragment\HIncludeFragmentRenderer</parameter>
  9. <parameter key="fragment.renderer.hinclude.global_template"></parameter>
  10. <parameter key="fragment.renderer.esi.class">Symfony\Component\HttpKernel\Fragment\EsiFragmentRenderer</parameter>
  11. <parameter key="fragment.path">/_fragment</parameter>
  12. </parameters>
  13. <services>
  14. <service id="fragment.handler" class="%fragment.handler.class%">
  15. <argument type="service" id="service_container" />
  16. <argument type="service" id="request_stack" />
  17. <argument>%kernel.debug%</argument>
  18. </service>
  19. <service id="fragment.renderer.inline" class="%fragment.renderer.inline.class%">
  20. <tag name="kernel.fragment_renderer" alias="inline" />
  21. <argument type="service" id="http_kernel" />
  22. <argument type="service" id="event_dispatcher" />
  23. <call method="setFragmentPath"><argument>%fragment.path%</argument></call>
  24. </service>
  25. <service id="fragment.renderer.hinclude" class="%fragment.renderer.hinclude.class%">
  26. <argument /> <!-- templating or Twig service -->
  27. <argument type="service" id="uri_signer" />
  28. <argument>%fragment.renderer.hinclude.global_template%</argument>
  29. <call method="setFragmentPath"><argument>%fragment.path%</argument></call>
  30. </service>
  31. <service id="fragment.renderer.esi" class="%fragment.renderer.esi.class%">
  32. <tag name="kernel.fragment_renderer" alias="esi" />
  33. <argument type="service" id="esi" on-invalid="null" />
  34. <argument type="service" id="fragment.renderer.inline" />
  35. <argument type="service" id="uri_signer" />
  36. <call method="setFragmentPath"><argument>%fragment.path%</argument></call>
  37. </service>
  38. <service id="fragment.renderer.ssi" class="Symfony\Component\HttpKernel\Fragment\SsiFragmentRenderer">
  39. <tag name="kernel.fragment_renderer" alias="ssi" />
  40. <argument type="service" id="ssi" on-invalid="null" />
  41. <argument type="service" id="fragment.renderer.inline" />
  42. <argument type="service" id="uri_signer" />
  43. <call method="setFragmentPath"><argument>%fragment.path%</argument></call>
  44. </service>
  45. </services>
  46. </container>