Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
builderhandledmessagefromdatamanager.php
1<?php
2
4
8use Bitrix\Calendar\Internals\EO_QueueHandledMessage;
10
12{
13 private EO_QueueHandledMessage $data;
14
15 public function __construct(EO_QueueHandledMessage $data)
16 {
17 $this->data = $data;
18 }
19
25 public function build(): ?HandledMessage
26 {
27 $message = (new BuilderMessageFromDataManager($this->data->getMessage()))->build();
28 $queue = (new QueueFactory())->getById($this->data->getQueueId());
29 return (new HandledMessage())
30 ->setId($this->data->getId())
31 ->setMessage($message)
32 ->setHash($this->data->getHash())
33 ->setQueue($queue)
34 ->setDateCreate(new Date($this->data->getDateCreate())) // TODO: check date is seted
35 ;
36 }
37}