services:
    Claroline\WebResourceBundle\Manager\WebResourceManager:
        arguments:
            - '%claroline.param.files_directory%'
            - '%claroline.param.uploads_directory%'
            - '@Claroline\AppBundle\Persistence\ObjectManager'

    Claroline\WebResourceBundle\Controller\API\WebResourceController:
        parent: Claroline\AppBundle\Controller\AbstractCrudController
        public: true
        arguments:
            - '@Claroline\CoreBundle\Manager\ResourceManager'
            - '@Claroline\WebResourceBundle\Manager\WebResourceManager'

    Claroline\WebResourceBundle\Listener\WebResourceListener:
        arguments:
            - '%claroline.param.files_directory%'
            - '@Claroline\AppBundle\Persistence\ObjectManager'
            - '%claroline.param.uploads_directory%'
            - '@Claroline\WebResourceBundle\Manager\WebResourceManager'
            - '@Claroline\CoreBundle\Manager\ResourceManager'
            - '@Claroline\AppBundle\API\SerializerProvider'
        tags:
            - { name: kernel.event_listener, event: resource.claroline_web_resource.load, method: onLoad }
            - { name: kernel.event_listener, event: resource.claroline_web_resource.export, method: onExport }
            - { name: kernel.event_listener, event: resource.claroline_web_resource.import, method: onImport }
            - { name: kernel.event_listener, event: resource.claroline_web_resource.delete, method: onDelete }
            - { name: kernel.event_listener, event: download_claroline_web_resource, method: onDownload }
            - { name: kernel.event_listener, event: resource.claroline_web_resource.change_file, method: onFileChange }
