title: Using controller class's method in other class
body: <p>I want to use renderView()
  in other class than Controller.</p>
  
  <pre><code>class RegistrationFormHandler extends BaseRegistrationFormHandler  
  {
  
      protected function onSuccess(UserInterface $user, $confirmation)
      {
              $messaggio = \Swift_Message::newInstance()
      ...
          -&gt;setBody($this-&gt;renderView('AcmeMemberBundle:Default:firstemailtocustomer.txt.twig',array('user' =&gt; $user)));
  </code></pre>
  
  <p>it shows </p>
  
  <pre><code>FatalErrorException: Error: Call to undefined method Acme\UserBundle\Form\Handler\RegistrationFormHandler::renderView() in 
  </code></pre>
  
  <p>but if you try same method in controller class.</p>
  
  <pre><code>class DefaultController extends Controller
  {
  
  public function mainAction(){
      $messaggio = \Swift_Message::newInstance()
      ...
          -&gt;setBody($this-&gt;renderView('AcmeMemberBundle:Default:firstemailtocustomer.txt.twig',array('user' =&gt; $user)));
  </code></pre>
  
  <p>it works well.</p>
  
  <p>I think I should get instance of controller class.</p>
  
  <p>How can I solove this?</p>
  
  <hr>
  
  <p>Thanks to tim's answer.</p>
  
  <p>I add this to services.xml </p>
  
  <pre><code>    &lt;service id="acme.default.controller" class="Acme\MemberBundle\Controller\DefaultController" public="false"&gt;
          &lt;argument&gt;acme.controller.default.class&lt;/argument&gt;
       &lt;/service&gt;
  </code></pre>
  
  <p>and   use like this</p>
  
  <pre><code>-&gt;setBody($this-&gt;forward('acme.controller.default.class')-&gt;renderView('AcmeMemberBundle:Default:firstemailtocustomer.txt.twig',array('user' =&gt; $user)));
  </code></pre>
  
  <p>but it says,</p>
  
  <pre><code>FatalErrorException: Error: Call to undefined method Acme\UserBundle\Form\Handler\RegistrationFormHandler::forward() in 
  </code></pre>