3declare(strict_types=1);
5namespace Bitrix\Im\V2\Promotion\Event\Update;
8use Bitrix\Im\V2\Promotion\Promotion;
9use Bitrix\Im\V2\Pull\BaseEvent;
10use Bitrix\Im\V2\Pull\Dto\Diff;
11use Bitrix\Im\V2\Pull\EventType;
12use Bitrix\Main\DI\ServiceLocator;
13use Bitrix\Main\Validation\ValidationService;
18 private array $sortedByUserData;
24 parent::__construct();
26 $this->validation = ServiceLocator::getInstance()->get(
'main.validation.service');
27 $this->sortedByUserData = $this->prepareData($sortedByUserData);
34 private function prepareData(
array $sortedByUserData):
array
42 foreach ($sortedByUserData as
$userId => $command)
44 $validationResult = $this->validation->validate($command);
45 if ($validationResult->isSuccess())
47 $preparedData[
$userId] = $command->toRestFormat();
56 return array_keys($this->sortedByUserData);
66 return EventType::PromotionUpdated;
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)