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

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

    d2_expressways_waybill_manager:
        class:          D2\ExpressWaysBundle\DependencyInjection\Services\WaybillManager
        arguments:      [@service_container, @doctrine.orm.entity_manager, @d2_expressways_service_definition_manager, @d2_calc_manager]

    d2_expressways_bundle.twig.expressways_extension:
        class:          D2\ExpressWaysBundle\Twig\ExpressWaysTwigExtension
        arguments:      [@doctrine, @service_container, @d2_expressways_partner_file_manager, @d2_expressways_service_definition_manager]
        tags:
            - { name: twig.extension }

    # With Selected Extensions
    d2_expressways_bundle.waybill_with_selected.extension:
        class:          D2\ExpressWaysBundle\DependencyInjection\Services\WaybillsWithSelectedExtension
        arguments:      [@doctrine, @service_container]
        tags:
            - { name: d2.with_selected, alias: expressways_list }
            - { name: d2.with_selected, alias: expressways_waybill }
