parameters:
    orocrm_call.call.form.type.class:         OroCRM\Bundle\CallBundle\Form\Type\CallType
    orocrm_call.call.form.handler.class:      OroCRM\Bundle\CallBundle\Form\Handler\CallHandler
    orocrm_call.call.form.api.handler.class:  OroCRM\Bundle\CallBundle\Form\Handler\CallApiHandler
    orocrm_call.form.type.phone.class:        OroCRM\Bundle\CallBundle\Form\Type\CallPhoneType

    orocrm_call.call.form.type.api.class:     OroCRM\Bundle\CallBundle\Form\Type\CallApiType
    orocrm_call.call.manager.api.class:       Oro\Bundle\SoapBundle\Entity\Manager\ApiEntityManager

services:
    orocrm_call.call.form.type:
        class: %orocrm_call.call.form.type.class%
        tags:
            - { name: form.type, alias: orocrm_call_form }

    orocrm_call.call.form.type.api:
        class: %orocrm_call.call.form.type.api.class%
        tags:
            - { name: form.type, alias: orocrm_call_form_api }

    orocrm_call.form.type.phone:
        class: %orocrm_call.form.type.phone.class%
        tags:
            - { name: form.type, alias: orocrm_call_phone }

    orocrm_call.call.form.api:
        class: Symfony\Component\Form\Form
        factory_method: createNamed
        factory_service: form.factory
        arguments:
            - "call"
            - "orocrm_call_form_api"
            - null

    orocrm_call.call.form.handler:
        class: %orocrm_call.call.form.handler.class%
        scope: request
        arguments:
            - "orocrm_call_form"
            - "orocrm_call_form"
            - @request
            - @doctrine.orm.entity_manager
            - @oro_address.provider.phone
            - @orocrm_call.call.activity.manager
            - @oro_entity.routing_helper
            - @form.factory

    orocrm_call.call.form.handler.api:
            class: %orocrm_call.call.form.api.handler.class%
            scope: request
            arguments:
                - @orocrm_call.call.form.api
                - @request
                - @doctrine.orm.entity_manager

    orocrm_call.call.manager.api:
        class: %orocrm_call.call.manager.api.class%
        parent: oro_soap.manager.entity_manager.abstract
        arguments:
            - %orocrm_call.call.entity.class%
            - @doctrine.orm.entity_manager
