1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
syncmodel.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Access\Model;
4
5use Bitrix\Main\Access\AccessibleItem;
6
7final class SyncModel implements AccessibleItem
8{
9 private ?int $id = null;
10 private ?string $entityType = null;
11 private ?int $entityId = null;
12
13 public static function createFromArray(array $connection): ?self
14 {
15 if (empty($connection['ID']) || empty($connection['ENTITY_TYPE']) || empty($connection['ENTITY_ID']))
16 {
17 return null;
18 }
19
20 return self::createFromId((int)$connection['ID'])
21 ->setEntityType($connection['ENTITY_TYPE'])
22 ->setEntityId((int)$connection['ENTITY_ID'])
23 ;
24 }
25
26 public static function createFromId(int $itemId): self
27 {
28 return self::createNew()->setId($itemId);
29 }
30
31 public static function createNew(): self
32 {
33 return new self();
34 }
35
36 public function getId(): int
37 {
38 return $this->id;
39 }
40
41 public function setId(int $id): self
42 {
43 $this->id = $id;
44
45 return $this;
46 }
47
48 public function getEntityType(): string
49 {
50 return $this->entityType;
51 }
52
53 public function setEntityType(string $entityType): self
54 {
55 $this->entityType = $entityType;
56
57 return $this;
58 }
59
60 public function getEntityId(): int
61 {
62 return $this->entityId;
63 }
64
65 public function setEntityId(int $entityId): self
66 {
67 $this->entityId = $entityId;
68
69 return $this;
70 }
71}
$connection
Определения actionsdefinitions.php:38
setEntityType(string $entityType)
Определения syncmodel.php:53
static createFromArray(array $connection)
Определения syncmodel.php:13
static createFromId(int $itemId)
Определения syncmodel.php:26
setEntityId(int $entityId)
Определения syncmodel.php:65
</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