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

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

    d2_churchills_partner_pdr_manager:
        class:          D2\ChurchillsBundle\DependencyInjection\Services\PDR\PDRPartnerManager
        arguments:      [@service_container, @doctrine.orm.entity_manager]

    d2_churchills_waybill_manager:
        class:          D2\ChurchillsBundle\DependencyInjection\Services\WaybillManager
        arguments:      [@service_container, @doctrine.orm.entity_manager, @d2_churchills_service_definition_manager, @d2_calc_manager]

    d2_churchills_bundle.twig.churchills_extension:
        class:          D2\ChurchillsBundle\Twig\ChurchillsTwigExtension
        arguments:      [@doctrine, @service_container, @d2_churchills_partner_file_manager, @d2_churchills_service_definition_manager]
        tags:
            - { name: twig.extension }

    # With Selected Extensions
    d2_churchills_bundle.waybill_with_selected.extension:
        class:          D2\ChurchillsBundle\DependencyInjection\Services\WaybillsWithSelectedExtension
        arguments:      [@doctrine, @service_container]
        tags:
            - { name: d2.with_selected, alias: churchills_list }
            - { name: d2.with_selected, alias: churchills_waybill }
