services:
    # Tools
    Claroline\CursusBundle\Listener\Tool\TrainingEventsListener:
        arguments:
            - '@Claroline\AppBundle\API\FinderProvider'
        tags:
            - { name: kernel.event_listener, event: tool.open.workspace.training_events, method: onDisplayWorkspace }

    Claroline\CursusBundle\Listener\Tool\TrainingsListener:
        tags:
            - { name: kernel.event_listener, event: tool.open.desktop.trainings, method: onDisplayDesktop }

    # Data source
    Claroline\CursusBundle\Listener\DataSource\SessionSource:
        arguments:
            - '@security.authorization_checker'
            - '@security.token_storage'
            - '@Claroline\AppBundle\API\FinderProvider'
            - '@Claroline\AppBundle\Persistence\ObjectManager'
        tags:
            - { name: kernel.event_listener, event: data_source.course_sessions.load, method: getData }

    Claroline\CursusBundle\Listener\DataSource\PublicSessionSource:
        arguments:
            - '@security.authorization_checker'
            - '@security.token_storage'
            - '@Claroline\AppBundle\API\FinderProvider'
            - '@Claroline\AppBundle\Persistence\ObjectManager'
        tags:
            - { name: kernel.event_listener, event: data_source.public_course_sessions.load, method: getData }

    Claroline\CursusBundle\Listener\DataSource\MySessionSource:
        arguments:
            - '@Claroline\AppBundle\API\FinderProvider'
            - '@security.token_storage'
        tags:
            - { name: kernel.event_listener, event: data_source.my_course_sessions.load, method: getData }

    Claroline\CursusBundle\Listener\DataSource\AllCoursesSource:
        arguments:
            - '@Claroline\AppBundle\API\FinderProvider'
            - '@Claroline\AppBundle\Persistence\ObjectManager'
            - '@security.token_storage'
            - '@security.authorization_checker'
        tags:
            - { name: kernel.event_listener, event: data_source.all_courses.load, method: getData }

    Claroline\CursusBundle\Listener\DataSource\EventsSource:
        arguments:
            - '@security.authorization_checker'
            - '@security.token_storage'
            - '@Claroline\AppBundle\API\FinderProvider'
            - '@Claroline\AppBundle\Persistence\ObjectManager'
        tags:
            - { name: kernel.event_listener, event: data_source.training_events.load, method: getData }

    Claroline\CursusBundle\Listener\DataSource\MyEventsSource:
        arguments:
            - '@security.token_storage'
            - '@Claroline\AppBundle\API\FinderProvider'
        tags:
            - { name: kernel.event_listener, event: data_source.my_training_events.load, method: getData }
