Example #1
0
 function save($data)
 {
     $options = $this->getOptions();
     $data['owner_id'] = $this->udm->uid;
     $data['schedule_id'] = $options['schedule_id'];
     if (!isset($data['status'])) {
         $data['status'] = AMP_SCHEDULE_STATUS_DRAFT;
     }
     $item = new ScheduleItem($this->dbcon);
     $itemdata = $this->schedule_form->translate($data, 'get');
     $item->setData($itemdata);
     return $item->save();
 }