Exemple #1
0
 /**
  * @Route("/project-history", name="admin_project_history")
  * @Method({"GET"})
  * 
  * @Template
  */
 public function projectHistoryAction()
 {
     $projectHistoryTableView = new ProjectHistoryTableView();
     $projectHistory = $this->getDoctrine()->getRepository('CorvusAdminBundle:ProjectHistory')->findAll();
     foreach ($projectHistory as $ph) {
         $projectHistoryTableView->getProjectHistory()->add($ph);
     }
     $form = $this->createForm(new ProjectHistoryTableViewType(), $projectHistoryTableView);
     return array('form' => $form->createView());
 }
 public function __construct()
 {
     // Give the TableViewController parent the data it needs to construct the table view and methods
     parent::__construct(new ProjectHistory(), new ProjectHistoryType(), ProjectHistoryTableView::getDataName(), ProjectHistoryTableView::getTypeName());
 }