services.xml 1.86 KB
<?xml version="1.0" encoding="UTF-8" ?>

<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">

    <services>

        <service id="app.form.registration" class="UBV\AutenticacionBundle\Form\Type\RegistrationType">
            <tag name="form.type" alias="app_user_registration" />
        </service>
        
        <service id="ubv_user.mailer.twig_swift" class="UBV\AutenticacionBundle\Mailer\Mailer" public="false">
            <argument type="service" id="mailer" />
            <argument type="service" id="router" />
            <argument type="service" id="twig" />
            <argument type="collection">
                <argument key="template" type="collection">
                    <argument key="confirmation">%fos_user.registration.confirmation.template%</argument>
                    <argument key="resetting">%fos_user.resetting.email.template%</argument>
                </argument>
                <argument key="from_email" type="collection">
                    <argument key="confirmation">%fos_user.registration.confirmation.from_email%</argument>
                    <argument key="resetting">%fos_user.resetting.email.from_email%</argument>
                </argument>
            </argument>
        </service>
        <service id="fos_user.listener.email_confirmation" class="UBV\AutenticacionBundle\EventListener\EmailConfirmationListener">
            <tag name="kernel.event_subscriber" />
            <argument type="service" id="fos_user.mailer" />
            <argument type="service" id="fos_user.util.token_generator" />
            <argument type="service" id="router" />
            <argument type="service" id="session" />
        </service>
    

    </services>

</container>