function setValues($data) { $result = parent::setValues($data); if ($data['schedule_id']) { $this->setSchedule($data['schedule_id']); } return $result; }
function setValues($data) { $result = parent::setValues($data); if (!isset($data['action_id'])) { return $result; } $action = new ScheduleItem(AMP_Registry::getDbcon(), $data['action_id']); if ($action->isOpen()) { return $result; } if (!($schedule_id = $this->_locateActionSchedule($data, 'schedule_id'))) { return $result; } $form_field = 'action_id_' . $schedule_id; $current_set = $this->_getValueSet($form_field); $this->addToFieldValueSet($form_field, array($data['action_id'] => $action->describeSlot())); return $result; }