title: symfony2: trying to render a form in the template
body: <p>I'm trying to render a form that I've just generated from an entity, but Im getting the error below...</p>
  
  <pre><code>&lt;?php
  
  namespace Prueba\FrontendBundle\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  use Prueba\FrontendBundle\Form\ItemType;
  
  class DefaultController extends Controller
  {
  /**
  * @Route("/hello")
  * @Template()          
  */                      
  public function indexAction($name)       
  {                              
       $form = new ItemType();var_dump(get_class($form));                                 
                  return $this-&gt;render('AcmeTaskBundle:Default:new.html.twig', array(             
                                          'form' =&gt; $form-&gt;createView(),
                                                   ));
      }                            
  }
  </code></pre>
  
  <blockquote>
    <p>string(35) "Prueba\FrontendBundle\Form\ItemType" Fatal error: Call to
    undefined method Prueba\FrontendBundle\Form\ItemType::createView() in
    /home/javier/programacion/sf2000/src/Prueba/FrontendBundle/Controller/DefaultController.php
    on line 20</p>
  </blockquote>