/** * send email to hr admin group notifying hsp payment request made by a employee. * @param HspPaymentRequest $hspPaymentRequest model/HspPaymentRequest bean * @return boolean $success true if successfuly send or null otherwise **/ public function sendHspPaymentRequestNotifications($hspPaymentRequest, $link) { $toAddress = null; $subject = null; $msg = null; $empId = null; $empName = null; $logMsg = ''; $empId = $hspPaymentRequest->getEmployeeId(); $empName = $this->_getEmployeeName($empId); $emailNotificationTypeId = EmailNotificationConfiguration::EMAILNOTIFICATIONCONFIGURATION_NOTIFICATION_TYPE_HSP; $toAddress = $this->_getNotificationAddress($emailNotificationTypeId); $subject = $this->_getPaymentRequestSubject($empName); $msg = $this->_getPaymentRequestMsg($empName, $link); $success = $this->_sendEmail($msg, $subject, $toAddress); return $success; }