コード例 #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());
 }
コード例 #2
0
 public function __construct()
 {
     // Give the TableViewController parent the data it needs to construct the table view and methods
     parent::__construct(new WorkHistory(), new WorkHistoryType(), WorkHistoryTableView::getDataName(), WorkHistoryTableView::getTypeName());
 }