/** * @Route("/skills", name="admin_skills") * @Method({"GET"}) * * @Template */ public function skillsAction() { $skillsTableView = new SkillsTableView(); $skills = $this->getDoctrine()->getRepository('CorvusAdminBundle:Skills')->FindAll(); foreach ($skills as $skill) { $skillsTableView->getSkills()->add($skill); } $form = $this->createForm(new SkillsTableViewType(), $skillsTableView); 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 Skills(), new SkillsType(), SkillsTableView::getDataName(), SkillsTableView::getTypeName()); }