Esempio n. 1
0
 public function getSchedule($con = null)
 {
     include_once 'lib/model/om/BaseSchedulePeer.php';
     if ($this->aSchedule === null && $this->schedule_id !== null) {
         $this->aSchedule = SchedulePeer::retrieveByPK($this->schedule_id, $con);
     }
     return $this->aSchedule;
 }
Esempio n. 2
0
 public function executeEditSchedule()
 {
     $schedule_id = $this->getRequestParameter('schedule_id');
     $schedule = SchedulePeer::retrieveByPK($schedule_id);
     $this->forward404Unless($schedule);
     $this->schedule = $schedule;
     $this->schedule_id = $schedule_id;
     $cs_detail = ScheduleDetailPeer::retrieveByPK($this->getRequestParameter('id'));
     $this->cs_detail = $cs_detail;
     $actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")), array('name' => 'cancel', 'url' => 'extracurricular/edit?id=' . $schedule->getId(), 'color' => 'black'));
     $this->subtitle = $schedule->getGradeComponent()->toString();
     $this->type = 'edit';
     $this->actions = $actions;
 }