function setUserDateTotalID($id) { $id = trim($id); $udtlf = new UserDateTotalListFactory(); if ($id == 0 or $this->Validator->isResultSetWithRows('user_date_total', $udtlf->getByID($id), TTi18n::gettext('User Date Total ID is invalid'))) { $this->data['user_date_total_id'] = $id; return TRUE; } return FALSE; }