title: How to change FOSUserBundle template dynamically in controller?
body: <p>I want to change confirmation template in my controller dynamically. How can I do it easily?</p>
  
  <p>Here is my config:</p>
  
  <pre><code>fos_user:
      [...]
      registration:
          form:
              type: madden_user_registration
              handler: madden_user.registration.form.handler
          confirmation:
              enabled:    true
              template: MaddenUserBundle:Registration:email_confirm.{locale}.html.twig
              from_email:
                  address:        %mailer_from%
                  sender_name:    %mailer_registration_name%
  </code></pre>
  
  <p>In my controller I have:</p>
  
  <pre class="lang-php prettyprint-override"><code>$confirmationEnabled = $this-&gt;container-&gt;getParameter('fos_user.registration.confirmation.enabled');
  $formHandler = $this-&gt;get('fos_user.registration.form.handler');
  $formHandler-&gt;process($confirmationEnabled);
  </code></pre>
  
  <p>Any ideas? Thanks!</p>