src/Cpm/JovenesBundle/Controller/InstanciaEventoController.php
/**
     * Displays a form to create a new InstanciaEvento entity.
     *
     * @Route("/new", name="instancia_new")
     * @Template()
     */
Displays a form to create a new InstanciaEvento entity.
Displays a form to create a new InstanciaEvento entity .
public function newAction()
    {
    	$entity = new InstanciaEvento();
        $eventoid = $this->getRequest()->query->get('evento_id', 0);
    	if ($eventoid)
    		$entity->setEvento($this->getRepository('CpmJovenesBundle:Evento')->find($eventoid));
        $form   = $this->createForm(new InstanciaEventoType(), $entity);
		$form['preview']->setData(true);
        return array(
            'entity' => $entity,
            'form'   => $form->createView(),
        );
    }
public function newAction ( ) { $ entity = new InstanciaEvento ( ) ; $ eventoid = $ this -> getRequest ( ) -> query -> get ( 'evento_id' , 0 ) ; if ( $ eventoid ) $ entity -> setEvento ( $ this -> getRepository ( 'CpmJovenesBundle:Evento' ) -> find ( $ eventoid ) ) ; $ form = $ this -> createForm ( new InstanciaEventoType ( ) , $ entity ) ; $ form [ 'preview' ] -> setData ( true ) ; return array ( 'entity' => $ entity , 'form' => $ form -> createView ( ) , ) ; }
Displays a form to create a new InstanciaEvento entity.
Displays a form to create a new InstanciaEvento entity .