コード例 #1
0
 /**
  * Displays a form to create a new Ticket entity.
  *
  */
 public function newAction()
 {
     $entity = new Ticket();
     $entity->setStatus(Ticket::STATUS_REPORTED);
     $entity->setPriority(Ticket::PRIORITY_NORMAL);
     $entity->setSeverity(Ticket::SEVERITY_MINOR);
     $form = $this->createCreateForm($entity);
     $entityComment = new TicketComment();
     $formComment = $this->createForm(new TicketCommentType(), $entityComment);
     return $this->render('TicketBundle:Ticket:new.html.twig', array('entity' => $entity, 'form' => $form->createView(), 'form_comment' => $formComment->createView(), 'menu' => array('top' => 'Ticket')));
 }