/** * @Route("/education", name="admin_education") * @Method({"GET"}) * * @Template */ public function educationAction() { $educationTableView = new EducationTableView(); $education = $this->getDoctrine()->getRepository('CorvusAdminBundle:Education')->findAll(); foreach ($education as $edu) { $educationTableView->getEducation()->add($edu); } $form = $this->createForm(new EducationTableViewType(), $educationTableView); 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 Education(), new EducationType(), EducationTableView::getDataName(), EducationTableView::getTypeName()); }