<?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="form.extension.class">Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension</parameter>
        <parameter key="form.factory.class">Symfony\Component\Form\FormFactory</parameter>
        <parameter key="form.type_guesser.validator.class">Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser</parameter>
    </parameters>

    <services>
        <!-- FormFactory -->
        <service id="form.factory" class="%form.factory.class%">
            <argument type="collection">
                <!--
                We don't need to be able to add more extensions.
                 * more types can be registered with the form.type tag
                 * more type_guessers can be registered with the form.type.type_guesser tag
                -->
                <argument type="service" id="form.extension" />
            </argument>
        </service>

        <!-- DependencyInjectionExtension -->
        <service id="form.extension" class="%form.extension.class%" public="false">
            <argument type="service" id="service_container" />
            <!--
            All services with tag "form.type" are inserted here by
            InitFormsPass
            -->
            <argument type="collection" />
            <!--
            All services with tag "form.type_extension" are inserted here by
            InitFormsPass
            -->
            <argument type="collection" />
            <!--
            All services with tag "form.type_guesser" are inserted here by
            InitFormsPass
            -->
            <argument type="collection" />
        </service>

        <!-- ValidatorTypeGuesser -->
        <service id="form.type_guesser.validator" class="%form.type_guesser.validator.class%">
            <tag name="form.type_guesser" />
            <argument type="service" id="validator.mapping.class_metadata_factory" />
        </service>

        <!-- CoreExtension -->
        <service id="form.type.field" class="Symfony\Component\Form\Extension\Core\Type\FieldType">
            <tag name="form.type" alias="field" />
            <argument type="service" id="validator" />
        </service>
        <service id="form.type.form" class="Symfony\Component\Form\Extension\Core\Type\FormType">
            <tag name="form.type" alias="form" />
        </service>
        <service id="form.type.birthday" class="Symfony\Component\Form\Extension\Core\Type\BirthdayType">
            <tag name="form.type" alias="birthday" />
        </service>
        <service id="form.type.checkbox" class="Symfony\Component\Form\Extension\Core\Type\CheckboxType">
            <tag name="form.type" alias="checkbox" />
        </service>
        <service id="form.type.choice" class="Symfony\Component\Form\Extension\Core\Type\ChoiceType">
            <tag name="form.type" alias="choice" />
        </service>
        <service id="form.type.collection" class="Symfony\Component\Form\Extension\Core\Type\CollectionType">
            <tag name="form.type" alias="collection" />
        </service>
        <service id="form.type.country" class="Symfony\Component\Form\Extension\Core\Type\CountryType">
            <tag name="form.type" alias="country" />
        </service>
        <service id="form.type.date" class="Symfony\Component\Form\Extension\Core\Type\DateType">
            <tag name="form.type" alias="date" />
        </service>
        <service id="form.type.datetime" class="Symfony\Component\Form\Extension\Core\Type\DateTimeType">
            <tag name="form.type" alias="datetime" />
        </service>
        <service id="form.type.email" class="Symfony\Component\Form\Extension\Core\Type\EmailType">
            <tag name="form.type" alias="email" />
        </service>
        <service id="form.type.file" class="Symfony\Component\Form\Extension\Core\Type\FileType">
            <tag name="form.type" alias="file" />
        </service>
        <service id="form.type.hidden" class="Symfony\Component\Form\Extension\Core\Type\HiddenType">
            <tag name="form.type" alias="hidden" />
        </service>
        <service id="form.type.integer" class="Symfony\Component\Form\Extension\Core\Type\IntegerType">
            <tag name="form.type" alias="integer" />
        </service>
        <service id="form.type.language" class="Symfony\Component\Form\Extension\Core\Type\LanguageType">
            <tag name="form.type" alias="language" />
        </service>
        <service id="form.type.locale" class="Symfony\Component\Form\Extension\Core\Type\LocaleType">
            <tag name="form.type" alias="locale" />
        </service>
        <service id="form.type.money" class="Symfony\Component\Form\Extension\Core\Type\MoneyType">
            <tag name="form.type" alias="money" />
        </service>
        <service id="form.type.number" class="Symfony\Component\Form\Extension\Core\Type\NumberType">
            <tag name="form.type" alias="number" />
        </service>
        <service id="form.type.password" class="Symfony\Component\Form\Extension\Core\Type\PasswordType">
            <tag name="form.type" alias="password" />
        </service>
        <service id="form.type.percent" class="Symfony\Component\Form\Extension\Core\Type\PercentType">
            <tag name="form.type" alias="percent" />
        </service>
        <service id="form.type.radio" class="Symfony\Component\Form\Extension\Core\Type\RadioType">
            <tag name="form.type" alias="radio" />
        </service>
        <service id="form.type.repeated" class="Symfony\Component\Form\Extension\Core\Type\RepeatedType">
            <tag name="form.type" alias="repeated" />
        </service>
        <service id="form.type.search" class="Symfony\Component\Form\Extension\Core\Type\SearchType">
            <tag name="form.type" alias="search" />
        </service>
        <service id="form.type.textarea" class="Symfony\Component\Form\Extension\Core\Type\TextareaType">
            <tag name="form.type" alias="textarea" />
        </service>
        <service id="form.type.text" class="Symfony\Component\Form\Extension\Core\Type\TextType">
            <tag name="form.type" alias="text" />
        </service>
        <service id="form.type.time" class="Symfony\Component\Form\Extension\Core\Type\TimeType">
            <tag name="form.type" alias="time" />
        </service>
        <service id="form.type.timezone" class="Symfony\Component\Form\Extension\Core\Type\TimezoneType">
            <tag name="form.type" alias="timezone" />
        </service>
        <service id="form.type.url" class="Symfony\Component\Form\Extension\Core\Type\UrlType">
            <tag name="form.type" alias="url" />
        </service>

        <!-- FieldTypeValidatorExtension -->
        <service id="form.type_extension.field" class="Symfony\Component\Form\Extension\Validator\Type\FieldTypeValidatorExtension">
            <tag name="form.type_extension" alias="field" />
            <argument type="service" id="validator" />
        </service>
    </services>
</container>
