Exemplo n.º 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());
 }
Exemplo n.º 2
0
 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());
 }