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

    <services>
        <!-- ResolvedFormTypeFactory -->
        <service id="form.resolved_type_factory" class="%form.resolved_type_factory.class%" />

        <!-- FormRegistry -->
        <service id="form.registry" class="%form.registry.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 extensions can be registered with the form.type_extension tag
                 * more type_guessers can be registered with the form.type_guesser tag
                -->
                <argument type="service" id="form.extension" />
            </argument>
            <argument type="service" id="form.resolved_type_factory" />
        </service>

        <!-- FormFactory -->
        <service id="form.factory" class="%form.factory.class%">
            <argument type="service" id="form.registry" />
            <argument type="service" id="form.resolved_type_factory" />
        </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 FormPass -->
            <argument type="collection" />
            <!-- All services with tag "form.type_extension" are inserted here by FormPass -->
            <argument type="collection" />
            <!-- All services with tag "form.type_guesser" are inserted here by FormPass -->
            <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.form" class="Symfony\Component\Form\Extension\Core\Type\FormType">
            <argument type="service" id="property_accessor"/>
            <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>
        <service id="form.type.button" class="Symfony\Component\Form\Extension\Core\Type\ButtonType">
            <tag name="form.type" alias="button" />
        </service>
        <service id="form.type.submit" class="Symfony\Component\Form\Extension\Core\Type\SubmitType">
            <tag name="form.type" alias="submit" />
        </service>
        <service id="form.type.reset" class="Symfony\Component\Form\Extension\Core\Type\ResetType">
            <tag name="form.type" alias="reset" />
        </service>
        <service id="form.type.currency" class="Symfony\Component\Form\Extension\Core\Type\CurrencyType">
            <tag name="form.type" alias="currency" />
        </service>

        <!-- FormTypeHttpFoundationExtension -->
        <service id="form.type_extension.form.http_foundation" class="Symfony\Component\Form\Extension\HttpFoundation\Type\FormTypeHttpFoundationExtension">
            <tag name="form.type_extension" alias="form" />
        </service>

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