function setSchedulePolicyID($id) { $id = trim($id); if ($id == '' or empty($id)) { $id = NULL; } $splf = new SchedulePolicyListFactory(); if ($id == NULL or $this->Validator->isResultSetWithRows('schedule_policy', $splf->getByID($id), TTi18n::gettext('Schedule Policy is invalid'))) { $this->data['schedule_policy_id'] = $id; return TRUE; } return FALSE; }