Add latest changes from icehrm pro

This commit is contained in:
gamonoid
2018-05-21 00:23:56 +02:00
parent 9c56b8acd1
commit 861e94cf9d
1375 changed files with 175006 additions and 2662 deletions

View File

@@ -1,6 +1,7 @@
<?php
namespace Classes;
use Employees\Common\Model\Employee;
use Model\Notification;
use Users\Common\Model\User;
@@ -14,6 +15,25 @@ class NotificationManager
$this->baseService = $baseService;
}
public function addNotificationToAll(
$message,
$action,
$type,
$fromEmployee,
$toUserId = null,
$fromSystem = false,
$sendEmail = false
) {
$employee = new Employee();
$employees = $employee->Find('status = ?', array('Active'));
foreach ($employees as $employee) {
if ($employee->id === $fromEmployee) {
continue;
}
$this->addNotification($employee->id, $message, $action, $type, $toUserId, $fromSystem, $sendEmail);
}
}
public function addNotification(
$toEmployee,
$message,