<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="shtumi_dependent_filtered_entity_controller_route">ShtumiUsefulBundle:DependentFilteredEntity:getOptions</parameter>
    </parameters>

    <services>

        <service id="shtumi.useful.type.ajax_autocomplete" class="Shtumi\UsefulBundle\Form\Type\AjaxAutocompleteType">
            <tag name="form.type" alias="shtumi_ajax_autocomplete" />
            <argument type="service" id="service_container"/>
        </service>

        <service id="shtumi.useful.type.select2_entity" class="Shtumi\UsefulBundle\Form\Type\Select2EntityType">
            <tag name="form.type" alias="shtumi_select2_entity" />
            <argument type="service" id="service_container"/>
        </service>

        <service id="shtumi.useful.type.dependent_filtered_entity" class="Shtumi\UsefulBundle\Form\Type\DependentFilteredEntityType">
            <tag name="form.type" alias="shtumi_dependent_filtered_entity"/>
            <argument type="service" id="service_container"/>
        </service>

        <service id="shtumi.useful.type.dependent_filtered_select2" class="Shtumi\UsefulBundle\Form\Type\DependentFilteredSelect2Type">
            <tag name="form.type" alias="shtumi_dependent_filtered_select2"/>
            <argument type="service" id="service_container"/>
        </service>

        <service id="shtumi.useful.type.ajax_file" class="Shtumi\UsefulBundle\Form\Type\AjaxFileType">
            <tag name="form.type" alias="shtumi_ajaxfile"/>
            <argument type="service" id="service_container"/>
        </service>

        <service id="shtumi.useful.type.daterange" class="Shtumi\UsefulBundle\Form\Type\DateRangeType">
            <tag name="form.type" alias="shtumi_daterange" />
            <argument type="service" id="service_container" />
            <argument>%shtumi.date_range%</argument>
        </service>


        <service id="shtumi.useful.orm.filter.type.ajax_autocomplete" class="Shtumi\UsefulBundle\Filter\AjaxAutocompleteFilter">
            <argument type="service" id="service_container"/>
            <tag name="sonata.admin.filter.type" alias="shtumi_ajax_autocomplete" />
        </service>

        <service id="shtumi_daterange" class="Shtumi\UsefulBundle\Service\DateRangeManager">
            <argument>%shtumi.date_range%</argument>
        </service>

    </services>



</container>
