Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
exporteventmanager.php
1<?php
2
4
9
11{
16
22 {
23 $this->factory = $factory;
24 $this->sectionMap = $sectionMap;
25 $this->outgoingEventManager = $factory->getOutgoingEventManager();
26 }
27
28 public function export(SyncEventMap $syncEventMap): self
29 {
30 if ($syncEventMap->count())
31 {
32 $this->exportResult = $this->outgoingEventManager->export($syncEventMap, $this->sectionMap);
33 }
34
35 return $this;
36 }
37
38 public function getEvents(): SyncEventMap
39 {
40 return $this->exportResult->isSuccess() && !empty($this->exportResult->getData()['externalSyncEventMap'])
41 ? $this->exportResult->getData()['externalSyncEventMap']
42 : new SyncEventMap()
43 ;
44 }
45}
__construct(FactoryBase $factory, SyncSectionMap $sectionMap)