private function _getLeaveTypeObjectWithValues() { $leaveType = new LeaveType(); $leaveType->setName('Special'); $leaveType->setDeleted(0); return $leaveType; }
public function getLeaveTypeObject() { $leaveTypeId = $this->getValue('hdnLeaveTypeId'); if (!empty($leaveTypeId)) { $leaveType = $this->getLeaveTypeService()->readLeaveType($leaveTypeId); } else { $leaveType = new LeaveType(); $leaveType->setDeleted(0); } $leaveType->setName($this->getValue('txtLeaveTypeName')); $leaveType->setExcludeInReportsIfNoEntitlement($this->getValue('excludeIfNoEntitlement')); return $leaveType; }