Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
exporteventmanager.php
1
<?php
2
3
namespace
Bitrix\Calendar\Sync\Managers
;
4
5
use
Bitrix\Calendar\Sync\Entities\SyncEventMap
;
6
use
Bitrix\Calendar\Sync\Entities\SyncSectionMap
;
7
use
Bitrix\Calendar\Sync\Factories\FactoryBase
;
8
use
Bitrix\Calendar\Sync\Util\Result
;
9
10
class
ExportEventManager
11
{
12
protected
FactoryBase
$factory
;
13
protected
SyncSectionMap
$sectionMap
;
14
protected
Result
$exportResult
;
15
protected
OutgoingEventManagerInterface
$outgoingEventManager
;
16
21
public
function
__construct
(
FactoryBase
$factory
,
SyncSectionMap
$sectionMap
)
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
}
Bitrix\Calendar\Core\Base\Collection\count
count()
Definition
collection.php:36
Bitrix\Calendar\Core\Base\Result
Definition
result.php:6
Bitrix\Calendar\Sync\Entities\SyncEventMap
Definition
synceventmap.php:12
Bitrix\Calendar\Sync\Entities\SyncSectionMap
Definition
syncsectionmap.php:10
Bitrix\Calendar\Sync\Factories\FactoryBase
Definition
factorybase.php:12
Bitrix\Calendar\Sync\Managers\ExportEventManager
Definition
exporteventmanager.php:11
Bitrix\Calendar\Sync\Managers\ExportEventManager\getEvents
getEvents()
Definition
exporteventmanager.php:38
Bitrix\Calendar\Sync\Managers\ExportEventManager\$exportResult
Result $exportResult
Definition
exporteventmanager.php:14
Bitrix\Calendar\Sync\Managers\ExportEventManager\$outgoingEventManager
OutgoingEventManagerInterface $outgoingEventManager
Definition
exporteventmanager.php:15
Bitrix\Calendar\Sync\Managers\ExportEventManager\export
export(SyncEventMap $syncEventMap)
Definition
exporteventmanager.php:28
Bitrix\Calendar\Sync\Managers\ExportEventManager\$sectionMap
SyncSectionMap $sectionMap
Definition
exporteventmanager.php:13
Bitrix\Calendar\Sync\Managers\ExportEventManager\$factory
FactoryBase $factory
Definition
exporteventmanager.php:12
Bitrix\Calendar\Sync\Managers\ExportEventManager\__construct
__construct(FactoryBase $factory, SyncSectionMap $sectionMap)
Definition
exporteventmanager.php:21
Bitrix\Calendar\Sync\Util\Result
Definition
result.php:6
Bitrix\Calendar\Sync\Factories\FactoryInterface\getOutgoingEventManager
getOutgoingEventManager()
Bitrix\Calendar\Sync\Managers\OutgoingEventManagerInterface
Definition
outgoingeventmanagerinterface.php:8
Bitrix\Calendar\Sync\Managers
Definition
connectionmanager.php:3
modules
calendar
lib
sync
managers
exporteventmanager.php
Создано системой
1.10.0