function setName($name) { $name = trim($name); $psenlf = new PayStubEntryNameListFactory(); $result = $psenlf->getByName($name); if ($this->Validator->isResultSetWithRows('name', $result, TTi18n::gettext('Invalid Entry Name'))) { $this->data['pay_stub_entry_name_id'] = $result->getId(); return TRUE; } return FALSE; }