1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
SyncInfo.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Integration\HumanResources\Sync\Item;
4
5use Bitrix\HumanResources\Item\NodeMember;
6use Bitrix\HumanResources\Item\NodeRelation;
7
9{
10 public function __construct(
11 public readonly EntityType $entityType,
12 public readonly int $entityId,
13 public readonly int $nodeId,
14 public readonly bool $withChildNodes,
15 public readonly SyncDirection $direction,
16 ) {}
17
18 public static function createFromRow(array $row): self
19 {
20 return new static(
21 EntityType::tryFrom($row['ENTITY_TYPE']),
22 (int)$row['ENTITY_ID'],
23 (int)$row['NODE_ID'],
24 $row['WITH_CHILD_NODES'] === 'Y',
25 SyncDirection::tryFrom($row['DIRECTION']),
26 );
27 }
28
29 public static function createFromNodeRelation(NodeRelation $node, SyncDirection $direction): self
30 {
31 return new static(
32 EntityType::CHAT,
33 $node->entityId,
34 $node->nodeId,
35 $node->withChildNodes,
37 );
38 }
39
40 public static function createFromNodeMember(NodeMember $member, SyncDirection $direction): self
41 {
42 return new static(
44 $member->entityId,
45 $member->nodeId,
46 false,
48 );
49 }
50}
static createFromNodeMember(NodeMember $member, SyncDirection $direction)
Определения SyncInfo.php:40
static createFromNodeRelation(NodeRelation $node, SyncDirection $direction)
Определения SyncInfo.php:29
__construct(public readonly EntityType $entityType, public readonly int $entityId, public readonly int $nodeId, public readonly bool $withChildNodes, public readonly SyncDirection $direction,)
Определения SyncInfo.php:10
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$entityId
Определения payment.php:4
$direction
Определения prolog_auth_admin.php:25