services:
    islamic_content.listener.entry_event:
        class: Rawafed\IslamicContentBundle\Service\RecitationsEventListener
        tags:
            - { name: doctrine.event_listener, event: postLoad }

    islamic_content.locale_listener:
        class: Rawafed\IslamicContentBundle\Service\LocaleListener
        arguments: [@doctrine.orm.entity_manager]
        tags:
            - { name: kernel.event_listener, event: kernel.request, priority: -16, method: onKernelRequest }

    islamic_content.listener.indexing:
        class: Rawafed\IslamicContentBundle\Search\IndexingEventListener
        arguments: [@doctrine.orm.entity_manager, @translator]
        tags:
            - { name: kernel.event_listener, event: search_engine.indexing, priority:128, method: onIndexing }

    islamic_content.joblist_handler.fatwa_request:
        class: Rawafed\IslamicContentBundle\Service\FatwaRequestJobHandler
        arguments: [@router, @doctrine.orm.entity_manager]
        tags:
          - { name: 'job_handler', alias: 'fatwa_request_job_handler' }



    #-------------------------------------------------------------------------------
    #lessons
    rawafed.content.lessons.job_handler:
        class: Rawafed\IslamicContentBundle\JobsHandlers\LessonsJobHandler
        arguments: [@router, @doctrine.orm.entity_manager, @mailer, @templating, "%locale%", "%islamic_content.sender.email%", "%islamic_content.sender.name%"]
        tags:
          - { name: 'job_handler', alias: 'lessons_job_handler' }

    #videos
    rawafed.content.videos.job_handler:
        class: Rawafed\IslamicContentBundle\JobsHandlers\VideosJobHandler
        arguments: [@router, @doctrine.orm.entity_manager, @mailer, @templating, "%locale%", "%islamic_content.sender.email%", "%islamic_content.sender.name%"]
        tags:
          - { name: 'job_handler', alias: 'videos_job_handler' }

    #fatawa
    rawafed.content.fatawa.job_handler:
        class: Rawafed\IslamicContentBundle\JobsHandlers\FatawaJobHandler
        arguments: [@router, @doctrine.orm.entity_manager, @mailer, @templating, "%locale%", "%islamic_content.sender.email%", "%islamic_content.sender.name%"]
        tags:
          - { name: 'job_handler', alias: 'fatawa_job_handler' }

    #books
    rawafed.content.books.job_handler:
        class: Rawafed\IslamicContentBundle\JobsHandlers\BooksJobHandler
        arguments: [@router, @doctrine.orm.entity_manager, @mailer, @templating, "%locale%", "%islamic_content.sender.email%", "%islamic_content.sender.name%"]
        tags:
          - { name: 'job_handler', alias: 'books_job_handler' }

    #audiobooks
    rawafed.content.audiobooks.job_handler:
        class: Rawafed\IslamicContentBundle\JobsHandlers\AudioBooksJobHandler
        arguments: [@router, @doctrine.orm.entity_manager, @mailer, @templating, "%locale%", "%islamic_content.sender.email%", "%islamic_content.sender.name%"]
        tags:
          - { name: 'job_handler', alias: 'audiobooks_job_handler' }
