public function deleteAction() { if (isset($_GET['id'])) { $dao = new DirectorDAO(); $id = intval($_GET['id']); $dao->delete($id); } header('Location: index.php?ctrl=director&act=index'); }
public function formAction() { $dir = new DirectorDAO(); $directors = $dir->findAll(); $this->render('insertProgram', array('program' => new ProgramDTO(), 'directors' => $directors)); }