/**
  * Displays a form to create a new Form entity.
  *
  */
 public function newAction()
 {
     $entity = new FormEntity();
     $entity->setTemplate('keltanasTrackingBundle:Form:form.html.twig');
     $form = $this->createCreateForm($entity);
     return $this->render('keltanasTrackingBundle:Form:new.html.twig', array('entity' => $entity, 'form' => $form->createView()));
 }
Example #2
0
 /**
  * @param Form $form
  */
 public function setForm($form)
 {
     $this->form = $form;
     $this->setTitle($form->getTitle());
     $this->setButton($form->getButton());
 }
 /**
  * Returns the name of this type.
  *
  * @return string The name of this type
  */
 public function getName()
 {
     return $this->entity ? $this->entity->getName() : 'fail';
 }