parameters:
    orocrm_contact_us.contactrequest.entity.class:           OroCRM\Bundle\ContactUsBundle\Entity\ContactRequest
    orocrm_contact_us.embedded_form.class:                   OroCRM\Bundle\ContactUsBundle\Form\Type\ContactRequestType
    orocrm_contact_us.contact_request.form.handler.class:    OroCRM\Bundle\ContactUsBundle\Form\Handler\ContactRequestHandler
    orocrm_contact_us.provider.phone.abstract_contact_request.class: OroCRM\Bundle\ContactUsBundle\Provider\AbstractContactRequestPhoneProvider

services:
    orocrm_contact_us.embedded_form:
        class: %orocrm_contact_us.embedded_form.class%
        tags:
            - { name: oro_embedded_form, label: orocrm.contactus.contactrequest.entity_label }
            - { name: form.type, alias: orocrm_contactus_contact_request }

    orocrm_contact_us.contact_request.form:
        class: Symfony\Component\Form\Form
        factory_method: createNamed
        factory_service: form.factory
        arguments:
            - "orocrm_contactus_contact_request"
            - "orocrm_contactus_contact_request"
            - null
            - { dataChannelField : true }

    orocrm_contact_us.contact_request.form.handler:
        class: %orocrm_contact_us.contact_request.form.handler.class%
        scope: request
        arguments:
            - @orocrm_contact_us.contact_request.form
            - @request
            - @doctrine.orm.entity_manager

    orocrm_contact_us.provider.phone.abstract_contact_request:
        class: %orocrm_contact_us.provider.phone.abstract_contact_request.class%
        tags:
            - { name: oro_address.phone_provider, class: OroCRM\Bundle\ContactUsBundle\Entity\AbstractContactRequest }
