# Learn more about services, parameters and containers at
# http://symfony.com/doc/current/book/service_container.html
parameters:
#    parameter_name: value

services:
#    service_name:
#        class: AppBundle\Directory\ClassName
#        arguments: ["@another_service_name", "plain_value", "%parameter_name%"]

  app.controller_listener:
    class: AppBundle\Listener\KernelControllerListener
    arguments:
      - '@doctrine.orm.entity_manager'
      - '@controller_resolver'
    tags:
      - { name: kernel.event_listener, event: kernel.controller, method: onKernelController }

  app.twig_extension:
    class: AppBundle\Twig\AppExtension
    #public: false
    arguments:
      - '@twig'
      - '@app.keyword_service'
      - '@request_stack'
    tags:
      - { name: twig.extension }

  form.type.datalist_type:
    class: AppBundle\Form\DatalistType
    tags:
      - { name: form.type, alias: datalist }

  app.booking_exporter:
    class: AppBundle\Export\BookingSternToursCrmExporter
    arguments:
      - '@monolog.logger'

  app.fewo_booking_exporter:
    class: AppBundle\Export\FewoBookingSternToursCrmExporter
    arguments:
      - '@monolog.logger'

  app.contact_exporter:
    class: AppBundle\Export\ContactSternToursCrmExporter
    arguments:
      - '@monolog.logger'

  app.keyword_service:
    class: AppBundle\Service\KeywordService
    arguments:
      - '@doctrine.orm.entity_manager'

  app.pdf:
    class: AppBundle\Pdf
    arguments:
      - '%kernel.root_dir%'
      - '@assetic.asset_manager'

  app.image_uploader:
    class: AppBundle\Service\FileManager
    arguments:
      - '%image_upload_directory%'

  app.image_upload_listener:
    class: AppBundle\Listener\DoctrineFileListener
    autowire: true
    tags:
      - { name: doctrine.event_listener, event: prePersist }
      - { name: doctrine.event_listener, event: preUpdate }
      - { name: doctrine.event_listener, event: preRemove }

  app.lodging_calendar_util:
    class: AppBundle\Service\LodgingCalendarService
    arguments:
      - '@doctrine.orm.entity_manager'