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

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

  app.slide_uploader:
    class: AppBundle\Services\FileUploader
    arguments: ['%slides_uploads_directory%']

  app.doctrine_slides_listener:
    class: AppBundle\EventListener\SlideListener
    arguments: ['@app.slide_uploader']
    tags:
        - { name: doctrine.event_listener, event: prePersist }
        - { name: doctrine.event_listener, event: preUpdate }
        - { name: doctrine.event_listener, event: postLoad }


  app.empresa_uploader:
    class: AppBundle\Services\FileUploader
    arguments: ['%empresas_uploads_directory%']

  app.doctrine_empresas_listener:
    class: AppBundle\EventListener\EmpresaListener
    arguments: ['@app.empresa_uploader']
    tags:
        - { name: doctrine.event_listener, event: prePersist }
        - { name: doctrine.event_listener, event: preUpdate }
        - { name: doctrine.event_listener, event: postLoad }


  app.persona_uploader:
    class: AppBundle\Services\FileUploader
    arguments: ['%personas_uploads_directory%']

  app.doctrine_personas_listener:
    class: AppBundle\EventListener\PersonaListener
    arguments: ['@app.persona_uploader']
    tags:
        - { name: doctrine.event_listener, event: prePersist }
        - { name: doctrine.event_listener, event: preUpdate }
        - { name: doctrine.event_listener, event: postLoad }

  app.imagen_seccion_uploader:
    class: AppBundle\Services\FileUploader
    arguments: ['%imagenes_seccion_uploads_directory%']

  app.doctrine_imagen_seccion_listener:
    class: AppBundle\EventListener\ImagenSeccionListener
    arguments: ['@app.imagen_seccion_uploader']
    tags:
        - { name: doctrine.event_listener, event: prePersist }
        - { name: doctrine.event_listener, event: preUpdate }
        - { name: doctrine.event_listener, event: postLoad }

  app.sede_uploader:
    class: AppBundle\Services\FileUploader
    arguments: ['%sedes_uploads_directory%']

  app.doctrine_sedes_listener:
    class: AppBundle\EventListener\SedeListener
    arguments: ['@app.sede_uploader']
    tags:
        - { name: doctrine.event_listener, event: prePersist }
        - { name: doctrine.event_listener, event: preUpdate }
        - { name: doctrine.event_listener, event: postLoad }

  app.imagen_galeria_uploader:
    class: AppBundle\Services\FileUploader
    arguments: ['%imagenes_galeria_uploads_directory%']

  app.doctrine_imagen_galeria_listener:
    class: AppBundle\EventListener\ImagenGaleriaListener
    arguments: ['@app.imagen_galeria_uploader']
    tags:
        - { name: doctrine.event_listener, event: prePersist }
        - { name: doctrine.event_listener, event: preUpdate }
        - { name: doctrine.event_listener, event: postLoad }

  app.bloque_contenido_uploader:
    class: AppBundle\Services\FileUploader
    arguments: ['%bloques_uploads_directory%']

  app.doctrine_bloque_contenido_listener:
    class: AppBundle\EventListener\BloqueContenidoListener
    arguments: ['@app.bloque_contenido_uploader']
    tags:
        - { name: doctrine.event_listener, event: prePersist }
        - { name: doctrine.event_listener, event: preUpdate }
        - { name: doctrine.event_listener, event: postLoad }

  app.evento_uploader:
    class: AppBundle\Services\FileUploader
    arguments: ['%eventos_uploads_directory%']

  app.doctrine_evento_listener:
    class: AppBundle\EventListener\EventoListener
    arguments: ['@app.evento_uploader']
    tags:
        - { name: doctrine.event_listener, event: prePersist }
        - { name: doctrine.event_listener, event: preUpdate }
        - { name: doctrine.event_listener, event: postLoad }

  app.twig.app_extension:
    public: false
    class: AppBundle\Twig\AppExtension
    tags:
        - { name: twig.extension }