parameters:
    orocrm_call.call.entity.class:                  OroCRM\Bundle\CallBundle\Entity\Call
    orocrm_call.event_listener.datagrid.call.class: OroCRM\Bundle\CallBundle\EventListener\Datagrid\CallListener

    orocrm_call.listener.datagrid.activity.class:   OroCRM\Bundle\CallBundle\EventListener\Datagrid\ActivityGridListener
    orocrm_call.listener.entity_listener.class:     OroCRM\Bundle\CallBundle\EventListener\EntityListener
    orocrm_call.call.activity.manager.class:        OroCRM\Bundle\CallBundle\Entity\Manager\CallActivityManager

    orocrm_call.activity_list.provider.class: OroCRM\Bundle\CallBundle\Provider\CallActivityListProvider

services:
    orocrm_call.event_listener.datagrid.call:
        class: %orocrm_call.event_listener.datagrid.call.class%
        arguments:
          - @doctrine.orm.entity_manager
        tags:
            - { name: kernel.event_listener, event: oro_datagrid.datagrid.build.before.widget-base-calls-grid, method: onBuildBefore }
            - { name: kernel.event_listener, event: oro_datagrid.datagrid.build.after.widget-base-calls-grid, method: onBuildAfter }

    orocrm_call.listener.datagrid.activity:
        class: %orocrm_call.listener.datagrid.activity.class%
        arguments:
            - @oro_activity.manager
            - @oro_entity.routing_helper
        tags:
            - { name: kernel.event_listener, event: oro_datagrid.datagrid.build.after.activity-call-grid, method: onBuildAfter }

    orocrm_call.listener.entity_listener:
        class: %orocrm_call.listener.entity_listener.class%
        arguments:
            - @orocrm_call.call.activity.manager
        tags:
            - { name: doctrine.event_listener, event: onFlush }

    orocrm_call.call.activity.manager:
        class: %orocrm_call.call.activity.manager.class%
        arguments:
            - @oro_activity.manager

    orocrm_call.activity_list.provider:
        class: %orocrm_call.activity_list.provider.class%
        arguments:
           - @oro_entity.doctrine_helper
        tags:
           - {name: oro_activity_list.provider, priority: 10 }

