public function __construct($filter = null) { if (null === $filter) { $filter = new Model_Discipline_Filter(); } $this->setFilter($filter); $this->setMapper(Model_DB_Discipline_Mapper::get_instance()); }
public function dialogAction() { try { $disciplineId = $this->getRequestIdDiscipline(); if ($disciplineId == 0) { $discipline = new Model_DB_Discipline_Object(); } else { $discipline = Model_DB_Discipline_Mapper::get_instance()->find($disciplineId); } $this->view->assign("id_speciality", $this->getRequestIdSpeciality()); $this->view->assign("discipline", $discipline); } catch (Exception $e) { echo $e->getMessage(); } }