renaming 2
This commit is contained in:
@@ -33,6 +33,7 @@ use Espo\Services\Email as EmailService;
|
||||
use Espo\Services\Stream as StreamService;
|
||||
|
||||
use Espo\Core\Notification\AssignmentNotificator;
|
||||
use Espo\Core\Notification\AssignmentNotificator\Params;
|
||||
use Espo\Core\Notification\UserEnabledChecker;
|
||||
use Espo\Core\Notification\AssignmentNotificatorParams;
|
||||
use Espo\Core\ServiceFactory;
|
||||
@@ -77,7 +78,7 @@ class Email implements AssignmentNotificator
|
||||
$this->aclManager = $aclManager;
|
||||
}
|
||||
|
||||
public function process(Entity $entity, AssignmentNotificatorParams $params): void
|
||||
public function process(Entity $entity, Params $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\AssignmentNotificatorParams;
|
||||
use Espo\Core\Notification\AssignmentNotificator\Params as AssignmentNotificatorParams;
|
||||
use Espo\Core\Mail\MessageWrapper;
|
||||
use Espo\Core\Utils\Config;
|
||||
use Espo\Core\FieldProcessing\Relation\LinkMultipleSaver;
|
||||
|
||||
@@ -31,10 +31,12 @@ namespace Espo\Core\Notification;
|
||||
|
||||
use Espo\ORM\Entity;
|
||||
|
||||
use Espo\Core\Notification\AssignmentNotificator\Params;
|
||||
|
||||
/**
|
||||
* Processes assignment notifications. Called after entity is saved.
|
||||
*/
|
||||
interface AssignmentNotificator
|
||||
{
|
||||
public function process(Entity $entity, AssignmentNotificatorParams $params): void;
|
||||
public function process(Entity $entity, Params $params): void;
|
||||
}
|
||||
|
||||
+2
-2
@@ -27,9 +27,9 @@
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Notification;
|
||||
namespace Espo\Core\Notification\AssignmentNotificator;
|
||||
|
||||
class AssignmentNotificatorParams
|
||||
class Params
|
||||
{
|
||||
private $options = [];
|
||||
|
||||
@@ -35,6 +35,8 @@ use Espo\ORM\EntityManager;
|
||||
use Espo\Entities\User;
|
||||
use Espo\Entities\Notification;
|
||||
|
||||
use Espo\Core\Notification\AssignmentNotificator\Params;
|
||||
|
||||
class DefaultAssignmentNotificator implements AssignmentNotificator
|
||||
{
|
||||
protected $user;
|
||||
@@ -50,7 +52,7 @@ class DefaultAssignmentNotificator implements AssignmentNotificator
|
||||
$this->userChecker = $userChecker;
|
||||
}
|
||||
|
||||
public function process(Entity $entity, AssignmentNotificatorParams $params): void
|
||||
public function process(Entity $entity, Params $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\AssignmentNotificatorParams;
|
||||
use Espo\Core\Notification\AssignmentNotificator\Params as AssignmentNotificatorParams;
|
||||
|
||||
use Espo\Core\Utils\Metadata;
|
||||
use Espo\Core\Utils\Config;
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace tests\unit\Espo\Core\FieldProcessing;
|
||||
namespace tests\unit\Espo\Core\Notification;
|
||||
|
||||
use Espo\Core\{
|
||||
Notification\AssignmentNotificatorParams,
|
||||
Notification\AssignmentNotificator\Params,
|
||||
};
|
||||
|
||||
class AssignmentNotificatorParamsTest extends \PHPUnit\Framework\TestCase
|
||||
@@ -41,7 +41,7 @@ class AssignmentNotificatorParamsTest extends \PHPUnit\Framework\TestCase
|
||||
'silent' => true,
|
||||
];
|
||||
|
||||
$params = AssignmentNotificatorParams
|
||||
$params = Params
|
||||
::create()
|
||||
->withRawOptions($options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user