mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 15:06:06 +00:00
rename
This commit is contained in:
@@ -34,7 +34,7 @@ use Espo\Services\Services\Stream as StreamService;
|
||||
|
||||
use Espo\Core\Notification\AssignmentNotificator;
|
||||
use Espo\Core\Notification\UserEnabledChecker;
|
||||
use Espo\Core\Notification\NotificatorParams;
|
||||
use Espo\Core\Notification\AssignmentNotificatorParams;
|
||||
use Espo\Core\ServiceFactory;
|
||||
use Espo\Core\AclManager;
|
||||
|
||||
@@ -77,7 +77,7 @@ class Email implements AssignmentNotificator
|
||||
$this->aclManager = $aclManager;
|
||||
}
|
||||
|
||||
public function process(Entity $entity, NotificatorParams $params): void
|
||||
public function process(Entity $entity, AssignmentNotificatorParams $params): void
|
||||
{
|
||||
if (!in_array($entity->get('status'), ['Archived', 'Sent', 'Being Imported'])) {
|
||||
return;
|
||||
|
||||
@@ -35,7 +35,7 @@ use Espo\ORM\EntityManager;
|
||||
|
||||
use Espo\Core\Notification\AssignmentNotificator;
|
||||
use Espo\Core\Notification\AssignmentNotificatorFactory;
|
||||
use Espo\Core\Notification\NotificatorParams;
|
||||
use Espo\Core\Notification\AssignmentNotificatorParams;
|
||||
use Espo\Core\Mail\MessageWrapper;
|
||||
use Espo\Core\Utils\Config;
|
||||
use Espo\Core\FieldProcessing\Relation\LinkMultipleSaver;
|
||||
@@ -685,7 +685,7 @@ class Importer
|
||||
if ($this->emailNotificationsEnabled()) {
|
||||
$this->notificator->process(
|
||||
$duplicate,
|
||||
NotificatorParams::create()->withRawOptions(['isBeingImported' => true])
|
||||
AssignmentNotificatorParams::create()->withRawOptions(['isBeingImported' => true])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,5 +36,5 @@ use Espo\ORM\Entity;
|
||||
*/
|
||||
interface AssignmentNotificator
|
||||
{
|
||||
public function process(Entity $entity, NotificatorParams $params): void;
|
||||
public function process(Entity $entity, AssignmentNotificatorParams $params): void;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
namespace Espo\Core\Notification;
|
||||
|
||||
class NotificatorParams
|
||||
class AssignmentNotificatorParams
|
||||
{
|
||||
private $options = [];
|
||||
|
||||
@@ -50,7 +50,7 @@ class DefaultAssignmentNotificator implements AssignmentNotificator
|
||||
$this->userChecker = $userChecker;
|
||||
}
|
||||
|
||||
public function process(Entity $entity, NotificatorParams $params): void
|
||||
public function process(Entity $entity, AssignmentNotificatorParams $params): void
|
||||
{
|
||||
if ($entity->hasLinkMultipleField('assignedUsers')) {
|
||||
$userIdList = $entity->getLinkMultipleIdList('assignedUsers');
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Espo\Tools\Notification;
|
||||
|
||||
use Espo\Core\Notification\AssignmentNotificatorFactory;
|
||||
use Espo\Core\Notification\AssignmentNotificator;
|
||||
use Espo\Core\Notification\NotificatorParams;
|
||||
use Espo\Core\Notification\AssignmentNotificatorParams;
|
||||
|
||||
use Espo\Core\Utils\Metadata;
|
||||
use Espo\Core\Utils\Config;
|
||||
@@ -108,7 +108,7 @@ class HookProcessor
|
||||
return;
|
||||
}
|
||||
|
||||
$params = NotificatorParams::create()->withRawOptions($options);
|
||||
$params = AssignmentNotificatorParams::create()->withRawOptions($options);
|
||||
|
||||
$notificator->process($entity, $params);
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
namespace tests\unit\Espo\Core\FieldProcessing;
|
||||
|
||||
use Espo\Core\{
|
||||
Notification\NotificatorParams,
|
||||
Notification\AssignmentNotificatorParams,
|
||||
};
|
||||
|
||||
class NotificatorParamsTest extends \PHPUnit\Framework\TestCase
|
||||
class AssignmentNotificatorParamsTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function testOne(): void
|
||||
{
|
||||
@@ -41,7 +41,7 @@ class NotificatorParamsTest extends \PHPUnit\Framework\TestCase
|
||||
'silent' => true,
|
||||
];
|
||||
|
||||
$params = NotificatorParams
|
||||
$params = AssignmentNotificatorParams
|
||||
::create()
|
||||
->withRawOptions($options);
|
||||
|
||||
Reference in New Issue
Block a user