1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
eventcategorymodel.php
См. документацию.
1<?php
2
4
8
9final class EventCategoryModel implements AccessibleItem
10{
11 private ?int $id = null;
12 private ?int $creatorId = null;
13 private ?bool $closed = null;
14
15 public function getId(): int
16 {
17 return $this->id;
18 }
19
20 public function setId(int $id): self
21 {
22 $this->id = $id;
23
24 return $this;
25 }
26
27 public function getCreatorId(): ?int
28 {
29 return $this->creatorId;
30 }
31
32 public function setCreatorId(int $creatorId): self
33 {
34 $this->creatorId = $creatorId;
35
36 return $this;
37 }
38
39 public function isClosed(): ?bool
40 {
41 return $this->closed;
42 }
43
44 public function setClosed(bool $closed): self
45 {
46 $this->closed = $closed;
47
48 return $this;
49 }
50
51 public static function createFromObject(EventCategory $category): self
52 {
53 return self::createFromId($category->getId())
54 ->setCreatorId($category->getCreatorId())
55 ->setClosed($category->getClosed())
56 ;
57 }
58
59 public static function createFromEntity(OpenEventCategory $category): self
60 {
61 return self::createFromId($category->getId())
62 ->setCreatorId($category->getCreatorId())
63 ->setClosed($category->getClosed())
64 ;
65 }
66
67 public static function createFromId(int $itemId): self
68 {
69 return self::createNew()->setId($itemId);
70 }
71
72 public static function createNew(): self
73 {
74 return new self();
75 }
76}
static createFromEntity(OpenEventCategory $category)
Определения eventcategorymodel.php:59
static createFromObject(EventCategory $category)
Определения eventcategorymodel.php:51