Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
importsectionmanager.php
1
<?php
2
3
namespace
Bitrix\Calendar\Sync\Managers
;
4
5
use Bitrix\Calendar\Core;
6
use
Bitrix\Calendar\Sync
;
7
use
Bitrix\Calendar\Sync\Factories\FactoryBase
;
8
use
Bitrix\Main\ArgumentException
;
9
use
Bitrix\Main\ObjectNotFoundException
;
10
use Exception;
11
12
class
ImportSectionManager
13
{
14
private
?
Sync\Entities\SyncSectionMap
$externalSyncSectionMap =
null
;
15
private
IncomingSectionManagerInterface
$importManager;
16
23
public
function
__construct
(
FactoryBase
$factory)
24
{
25
$this->importManager = $factory->
getIncomingSectionManager
();
26
}
27
35
public
function
import
():
ImportSectionManager
36
{
37
$result = $this->importManager->getSections();
38
if
($result->isSuccess())
39
{
40
$this->externalSyncSectionMap = $result->getData()[
'externalSyncSectionMap'
];
41
}
42
43
return
$this;
44
}
45
49
public
function
getSyncSectionMap
(): ?Sync\Entities\
SyncSectionMap
50
{
51
return
$this->externalSyncSectionMap ??
new
Sync\Entities\SyncSectionMap
();
52
}
53
54
public
function
getSyncToken
(): ?string
55
{
56
return
$this->importManager->getSyncToken();
57
}
58
59
public
function
getEtag
(): ?string
60
{
61
return
$this->importManager->getEtag();
62
}
63
64
public
function
getStatus
(): ?string
65
{
66
return
$this->importManager->getStatus();
67
}
68
}
Bitrix\Calendar\Sync\Entities\SyncSectionMap
Definition
syncsectionmap.php:10
Bitrix\Calendar\Sync\Factories\FactoryBase
Definition
factorybase.php:12
Bitrix\Calendar\Sync\Managers\ImportSectionManager
Definition
importsectionmanager.php:13
Bitrix\Calendar\Sync\Managers\ImportSectionManager\getEtag
getEtag()
Definition
importsectionmanager.php:59
Bitrix\Calendar\Sync\Managers\ImportSectionManager\__construct
__construct(FactoryBase $factory)
Definition
importsectionmanager.php:23
Bitrix\Calendar\Sync\Managers\ImportSectionManager\getSyncSectionMap
getSyncSectionMap()
Definition
importsectionmanager.php:49
Bitrix\Calendar\Sync\Managers\ImportSectionManager\getSyncToken
getSyncToken()
Definition
importsectionmanager.php:54
Bitrix\Calendar\Sync\Managers\ImportSectionManager\getStatus
getStatus()
Definition
importsectionmanager.php:64
Bitrix\Main\ArgumentException
Definition
exception.php:34
Bitrix\Main\ObjectNotFoundException
Definition
exception.php:203
Bitrix\Calendar\Sync\Factories\FactoryInterface\getIncomingSectionManager
getIncomingSectionManager()
Bitrix\Calendar\Sync\Managers\IncomingSectionManagerInterface
Definition
incomingsectionmanagerinterface.php:12
Bitrix\Calendar\Sync\Managers
Definition
connectionmanager.php:3
Bitrix\Calendar\Sync
modules
calendar
lib
sync
managers
importsectionmanager.php
Создано системой
1.10.0