parameters:
    orocrm_case.form.type.entity.class:                      OroCRM\Bundle\CaseBundle\Form\Type\CaseEntityType
    orocrm_case.form.type.entity.api.class:                  OroCRM\Bundle\CaseBundle\Form\Type\CaseEntityApiType
    orocrm_case.form.type.comment.class:                     OroCRM\Bundle\CaseBundle\Form\Type\CaseCommentType
    orocrm_case.form.type.comment.api.class:                 OroCRM\Bundle\CaseBundle\Form\Type\CaseCommentApiType
    orocrm_case.form.handler.entity.class:                   OroCRM\Bundle\CaseBundle\Form\Handler\CaseEntityHandler

services:
    orocrm_case.form.type.entity:
        class: %orocrm_case.form.type.entity.class%
        tags:
            - { name: form.type, alias: orocrm_case_entity }

    orocrm_case.form.type.entity.api:
        class: %orocrm_case.form.type.entity.api.class%
        tags:
            - { name: form.type, alias: orocrm_case_entity_api }

    orocrm_case.form.type.comment:
        class: %orocrm_case.form.type.comment.class%
        tags:
            - { name: form.type, alias: orocrm_case_comment }

    orocrm_case.form.type.comment.api:
        class: %orocrm_case.form.type.comment.api.class%
        tags:
            - { name: form.type, alias: orocrm_case_comment_api }

    orocrm_case.form.entity:
        class: Symfony\Component\Form\Form
        factory_method: createNamed
        factory_service: form.factory
        arguments:
            - 'orocrm_case_entity_form'
            - 'orocrm_case_entity'

    orocrm_case.form.entity.api:
        class: Symfony\Component\Form\Form
        factory_method: createNamed
        factory_service: form.factory
        arguments:
            - 'case'
            - 'orocrm_case_entity_api'

    orocrm_case.form.comment:
        class: Symfony\Component\Form\Form
        factory_method: createNamed
        factory_service: form.factory
        arguments:
            - 'orocrm_case_comment_form'
            - 'orocrm_case_comment'

    orocrm_case.form.comment.api:
        class: Symfony\Component\Form\Form
        factory_method: createNamed
        factory_service: form.factory
        arguments:
            - 'comment'
            - 'orocrm_case_comment_api'

    orocrm_case.form.handler.entity:
        class: %orocrm_case.form.handler.entity.class%
        scope: request
        arguments:
            - @orocrm_case.form.entity
            - @request
            - @doctrine.orm.entity_manager
            - @event_dispatcher
        tags:
            - { name: oro_tag.tag_manager }

    orocrm_case.form.handler.entity.api:
        class: %orocrm_case.form.handler.entity.class%
        scope: request
        arguments:
            - @orocrm_case.form.entity.api
            - @request
            - @doctrine.orm.entity_manager
            - @event_dispatcher
        tags:
            - { name: oro_tag.tag_manager }

    orocrm_case.form.handler.comment:
        class: %orocrm_case.form.handler.entity.class%
        scope: request
        arguments:
            - @orocrm_case.form.comment
            - @request
            - @doctrine.orm.entity_manager
            - @event_dispatcher

    orocrm_case.form.handler.comment.api:
        class: %orocrm_case.form.handler.entity.class%
        scope: request
        arguments:
            - @orocrm_case.form.comment.api
            - @request
            - @doctrine.orm.entity_manager
            - @event_dispatcher
