コード例 #1
0
ファイル: DefaultController.php プロジェクト: RavenB/corvus
 /**
  * @Route("/work-history", name="admin_work_history")
  * @Method({"GET"})
  * 
  * @Template
  */
 public function workHistoryAction()
 {
     $workHistoryTableView = new WorkHistoryTableView();
     $workHistory = $this->getDoctrine()->getRepository('CorvusAdminBundle:WorkHistory')->findAll();
     foreach ($workHistory as $wh) {
         $workHistoryTableView->getWorkHistory()->add($wh);
     }
     $form = $this->createForm(new WorkHistoryTableViewType(), $workHistoryTableView);
     return array('form' => $form->createView());
 }