1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
eventcategorymodel.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Calendar\Access\Model
;
4
5
use
Bitrix\Calendar\Core\EventCategory\EventCategory
;
6
use
Bitrix\Calendar\OpenEvents\Internals\Entity\OpenEventCategory
;
7
use
Bitrix\Main\Access\AccessibleItem
;
8
9
final
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
}
Bitrix\Calendar\Access\Model\EventCategoryModel
Определения
eventcategorymodel.php:10
Bitrix\Calendar\Access\Model\EventCategoryModel\createNew
static createNew()
Определения
eventcategorymodel.php:72
Bitrix\Calendar\Access\Model\EventCategoryModel\setClosed
setClosed(bool $closed)
Определения
eventcategorymodel.php:44
Bitrix\Calendar\Access\Model\EventCategoryModel\getId
getId()
Определения
eventcategorymodel.php:15
Bitrix\Calendar\Access\Model\EventCategoryModel\setCreatorId
setCreatorId(int $creatorId)
Определения
eventcategorymodel.php:32
Bitrix\Calendar\Access\Model\EventCategoryModel\createFromEntity
static createFromEntity(OpenEventCategory $category)
Определения
eventcategorymodel.php:59
Bitrix\Calendar\Access\Model\EventCategoryModel\isClosed
isClosed()
Определения
eventcategorymodel.php:39
Bitrix\Calendar\Access\Model\EventCategoryModel\createFromId
static createFromId(int $itemId)
Определения
eventcategorymodel.php:67
Bitrix\Calendar\Access\Model\EventCategoryModel\getCreatorId
getCreatorId()
Определения
eventcategorymodel.php:27
Bitrix\Calendar\Access\Model\EventCategoryModel\setId
setId(int $id)
Определения
eventcategorymodel.php:20
Bitrix\Calendar\Access\Model\EventCategoryModel\createFromObject
static createFromObject(EventCategory $category)
Определения
eventcategorymodel.php:51
Bitrix\Calendar\Core\EventCategory\EventCategory
Определения
eventcategory.php:9
Bitrix\Calendar\Core\EventCategory\EventCategory\getClosed
getClosed()
Определения
eventcategory.php:57
Bitrix\Calendar\Core\EventCategory\EventCategory\getId
getId()
Определения
eventcategory.php:21
Bitrix\Calendar\Core\EventCategory\EventCategory\getCreatorId
getCreatorId()
Определения
eventcategory.php:45
Bitrix\Calendar\OpenEvents\Internals\Entity\OpenEventCategory
Определения
OpenEventCategory.php:8
Bitrix\Main\Access\AccessibleItem
Определения
accessibleitem.php:13
Bitrix\Calendar\Access\Model
Определения
eventcategorymodel.php:3
bitrix
modules
calendar
lib
access
model
eventcategorymodel.php
Создано системой
1.14.0