Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
masterpushhandler.php
1
<?php
2
3
namespace
Bitrix\Calendar\Sync\Handlers
;
4
5
use
Bitrix\Calendar\Core\Role\Role
;
6
use Bitrix\Calendar\Core;
7
use
Bitrix\Calendar\Util
;
8
9
class
MasterPushHandler
extends
Core\Handlers\HandlerBase
10
{
11
public
const
MASTER_STAGE
= [
12
0 =>
'connection_created'
,
13
1 =>
'sections_sync_finished'
,
14
2 =>
'import_finished'
,
15
3 =>
'export_finished'
,
16
];
17
18
protected
Role
$owner
;
19
protected
string
$vendorName
;
20
protected
string
$accountName
;
21
22
public
function
__construct
(
Role
$owner
,
string
$vendorName
,
string
$accountName
)
23
{
24
$this->owner =
$owner
;
25
$this->vendorName =
$vendorName
;
26
$this->accountName =
$accountName
;
27
}
28
33
public
function
__invoke
(
string
$stage)
34
{
35
Util::addPullEvent
(
36
'process_sync_connection'
,
37
$this->owner->getId(),
38
[
39
'vendorName'
=> $this->vendorName,
40
'stage'
=> $stage,
41
'accountName'
=> $this->accountName,
42
]
43
);
44
}
45
46
}
Bitrix\Calendar\Core\Handlers\HandlerBase
Definition
handlerbase.php:7
Bitrix\Calendar\Core\Role\Role
Definition
role.php:8
Bitrix\Calendar\Sync\Handlers\MasterPushHandler
Definition
masterpushhandler.php:10
Bitrix\Calendar\Sync\Handlers\MasterPushHandler\MASTER_STAGE
const MASTER_STAGE
Definition
masterpushhandler.php:11
Bitrix\Calendar\Sync\Handlers\MasterPushHandler\$owner
Role $owner
Definition
masterpushhandler.php:18
Bitrix\Calendar\Sync\Handlers\MasterPushHandler\$accountName
string $accountName
Definition
masterpushhandler.php:20
Bitrix\Calendar\Sync\Handlers\MasterPushHandler\__construct
__construct(Role $owner, string $vendorName, string $accountName)
Definition
masterpushhandler.php:22
Bitrix\Calendar\Sync\Handlers\MasterPushHandler\__invoke
__invoke(string $stage)
Definition
masterpushhandler.php:33
Bitrix\Calendar\Sync\Handlers\MasterPushHandler\$vendorName
string $vendorName
Definition
masterpushhandler.php:19
Bitrix\Calendar\Util
Definition
util.php:16
Bitrix\Calendar\Util\addPullEvent
static addPullEvent(string $command, int $userId, array $params=[])
Definition
util.php:373
Bitrix\Calendar\Sync\Handlers
Definition
masterpushhandler.php:3
modules
calendar
lib
sync
handlers
masterpushhandler.php
Создано системой
1.10.0