services:
  php_translation.edit_in_place.response_listener:
    class: Translation\Bundle\EventListener\EditInPlaceResponseListener
    tags:
      - { name: 'kernel.event_listener', event: 'kernel.response', method: 'onKernelResponse' }
    arguments:
      - ~
      - '@router'
      - '@assets.packages'
      - ~
      - ~

  php_translation.edit_in_place.activator:
    class: Translation\Bundle\EditInPlace\Activator
    arguments: ['@session']
    public: true

  php_translator.edit_in_place.xtrans_html_translator:
    class: Translation\Bundle\Translator\EditInPlaceTranslator
    arguments:
      - '@translator'
      - ~
      - '@request_stack'

  php_translation.edit_in_place.extension.trans:
    public: false
    class: Translation\Bundle\Twig\EditInPlaceExtension
    arguments:
      - '@php_translator.edit_in_place.xtrans_html_translator'
    calls:
      - [setActivator, ['@php_translation.edit_in_place.activator']]
      - [setRequestStack, ['@request_stack']]
    tags:
      - { name: 'twig.extension' }

