services:
    d2_adhocwaybill_service_definition_manager:
        class:          D2\AdhocWaybillBundle\DependencyInjection\Services\ServiceDefinitionManager
        arguments:      [@service_container, @doctrine.orm.entity_manager]

    d2_adhocwaybill_partner_file_manager:
        class:          D2\AdhocWaybillBundle\DependencyInjection\Services\PartnerFileManager
        arguments:      [@service_container, @doctrine.orm.entity_manager]

    d2_adhocwaybill_waybill_manager:
        class:          D2\AdhocWaybillBundle\DependencyInjection\Services\WaybillManager
        arguments:      [@service_container, @doctrine.orm.entity_manager, @d2_adhocwaybill_service_definition_manager, @d2_calc_manager]

    d2_adhocwaybill_bundle.twig.adhocwaybill_extension:
        class:          D2\AdhocWaybillBundle\Twig\AdhocWaybillTwigExtension
        arguments:      [@doctrine, @service_container, @d2_adhocwaybill_partner_file_manager, @d2_adhocwaybill_service_definition_manager]
        tags:
            - { name: twig.extension }

    # With Selected Extensions
    d2_adhocwaybill_bundle.waybill_with_selected.extension:
        class:          D2\AdhocWaybillBundle\DependencyInjection\Services\WaybillsWithSelectedExtension
        arguments:      [@doctrine, @service_container]
        tags:
            - { name: d2.with_selected, alias: adhocwaybill_list }
            - { name: d2.with_selected, alias: adhocwaybill_waybill }
