services:
    _defaults:
        autowire: false
        autoconfigure: false
        public: false

    Icap\WikiBundle\Listener\Resource\WikiListener:
        arguments:
            - '@security.token_storage'
            - '@Claroline\AppBundle\Persistence\ObjectManager'
            - '@Icap\WikiBundle\Serializer\WikiSerializer'
            - '@Icap\WikiBundle\Manager\WikiManager'
            - '@Icap\WikiBundle\Manager\SectionManager'
            - '@security.authorization_checker'
        tags:
            - { name: kernel.event_listener, event: resource.icap_wiki.load, method: load }
            - { name: kernel.event_listener, event: resource.icap_wiki.copy, method: onCopy }
            - { name: kernel.event_listener, event: resource.icap_wiki.export, method: onExport }
            - { name: kernel.event_listener, event: resource.icap_wiki.import, method: onImport }

    Icap\WikiBundle\Listener\LogListener:
        arguments:
            - '@twig'
        tags:
            - { name: kernel.event_listener, event: create_log_list_item_resource-icap_wiki-section_create, method: onCreateLogListItem }
            - { name: kernel.event_listener, event: create_log_list_item_resource-icap_wiki-section_move, method: onCreateLogListItem }
            - { name: kernel.event_listener, event: create_log_list_item_resource-icap_wiki-section_update, method: onCreateLogListItem }
            - { name: kernel.event_listener, event: create_log_list_item_resource-icap_wiki-section_delete, method: onCreateLogListItem }
            - { name: kernel.event_listener, event: create_log_list_item_resource-icap_wiki-section_restore, method: onCreateLogListItem }
            - { name: kernel.event_listener, event: create_log_list_item_resource-icap_wiki-section_remove, method: onCreateLogListItem }
            - { name: kernel.event_listener, event: create_log_list_item_resource-icap_wiki-contribution_create, method: onCreateLogListItem }
            - { name: kernel.event_listener, event: create_log_list_item_resource-icap_wiki-configure, method: onCreateLogListItem }

            - { name: kernel.event_listener, event: create_log_details_resource-icap_wiki-section_create, method: onSectionCreateLogDetails }
            - { name: kernel.event_listener, event: create_log_details_resource-icap_wiki-section_move, method: onSectionCreateLogDetails }
            - { name: kernel.event_listener, event: create_log_details_resource-icap_wiki-section_update, method: onSectionCreateLogDetails }
            - { name: kernel.event_listener, event: create_log_details_resource-icap_wiki-section_delete, method: onSectionCreateLogDetails }
            - { name: kernel.event_listener, event: create_log_details_resource-icap_wiki-section_restore, method: onSectionCreateLogDetails }
            - { name: kernel.event_listener, event: create_log_details_resource-icap_wiki-section_remove, method: onSectionCreateLogDetails }
            - { name: kernel.event_listener, event: create_log_details_resource-icap_wiki-contribution_create, method: onSectionCreateLogDetails }
            - { name: kernel.event_listener, event: create_log_details_resource-icap_wiki-configure, method: onSectionCreateLogDetails }

    Icap\WikiBundle\Listener\NotificationListener:
        arguments:
            - '@translator'
            - '@router'
        tags:
            - { name: kernel.event_listener, event: create_notification_item_resource-icap_wiki-section_create, method: onCreateNotificationItem }
            - { name: kernel.event_listener, event: create_notification_item_resource-icap_wiki-contribution_create, method: onCreateNotificationItem }
            - { name: kernel.event_listener, event: create_notification_item_resource-icap_wiki-user_tagged, method: onCreateNotificationItem }

    Icap\WikiBundle\Listener\NotificationUserParametersListener:
        tags:
            - { name: kernel.event_listener, event: icap_notification_user_parameters_event, method: onGetTypesForParameters }

    Icap\WikiBundle\Listener\Entity\ContributionListener:
        public: true
        arguments:
            - '@Icap\NotificationBundle\Manager\NotificationManager'
        tags:
            - { name: 'doctrine.orm.entity_listener', entity: 'Icap\WikiBundle\Entity\Contribution', event: 'postPersist' }
