Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
recentitem.php
1
<?php
2
3
namespace
Bitrix\UI\EntitySelector
;
4
5
class
RecentItem
implements
\JsonSerializable
6
{
7
protected
$id
;
8
protected
$entityId
;
9
protected
$lastUseDate
;
10
protected
$loaded
=
false
;
11
protected
$available
=
true
;
12
13
public
function
__construct
(array $options)
14
{
15
$id
= $options[
'id'
] ??
null
;
16
if
((is_string(
$id
) &&
$id
!==
''
) || is_int(
$id
))
17
{
18
$id
= (string)(
int
)
$id
===
$id
? (int)
$id
:
$id
;
19
$this->
id
=
$id
;
20
}
21
22
$entityId
= $options[
'entityId'
] ??
null
;
23
if
(is_string(
$entityId
) &&
$entityId
!==
''
)
24
{
25
$this->entityId = strtolower(
$entityId
);
26
}
27
28
if
(isset($options[
'loaded'
]) && is_bool($options[
'loaded'
]))
29
{
30
$this->
setLoaded
($options[
'loaded'
]);
31
}
32
33
if
(isset($options[
'available'
]) && is_bool($options[
'available'
]))
34
{
35
$this->
setAvailable
($options[
'available'
]);
36
}
37
38
if
(isset($options[
'lastUseDate'
]) && is_int($options[
'lastUseDate'
]))
39
{
40
$this->
setLastUseDate
($options[
'lastUseDate'
]);
41
}
42
}
43
44
public
function
getId
()
45
{
46
return
$this->id
;
47
}
48
49
public
function
getEntityId
(): string
50
{
51
return
$this->entityId
;
52
}
53
54
public
function
getLastUseDate
(): ?int
55
{
56
return
$this->lastUseDate
;
57
}
58
59
public
function
setLastUseDate
(
int
$lastUseDate
): self
60
{
61
$this->lastUseDate =
$lastUseDate
;
62
63
return
$this;
64
}
65
66
public
function
isLoaded
(): bool
67
{
68
return
$this->loaded
;
69
}
70
71
public
function
setLoaded
(
bool
$flag): self
72
{
73
$this->loaded = $flag;
74
75
return
$this;
76
}
77
78
public
function
isAvailable
(): bool
79
{
80
return
$this->available
;
81
}
82
83
public
function
setAvailable
(
bool
$flag): self
84
{
85
$this->available = $flag;
86
87
return
$this;
88
}
89
90
public
function
jsonSerialize
()
91
{
92
return
[$this->
getEntityId
(), $this->
getId
()];
93
}
94
}
Bitrix\UI\EntitySelector\RecentItem
Definition
recentitem.php:6
Bitrix\UI\EntitySelector\RecentItem\getEntityId
getEntityId()
Definition
recentitem.php:49
Bitrix\UI\EntitySelector\RecentItem\getId
getId()
Definition
recentitem.php:44
Bitrix\UI\EntitySelector\RecentItem\__construct
__construct(array $options)
Definition
recentitem.php:13
Bitrix\UI\EntitySelector\RecentItem\isLoaded
isLoaded()
Definition
recentitem.php:66
Bitrix\UI\EntitySelector\RecentItem\$loaded
$loaded
Definition
recentitem.php:10
Bitrix\UI\EntitySelector\RecentItem\getLastUseDate
getLastUseDate()
Definition
recentitem.php:54
Bitrix\UI\EntitySelector\RecentItem\setAvailable
setAvailable(bool $flag)
Definition
recentitem.php:83
Bitrix\UI\EntitySelector\RecentItem\$available
$available
Definition
recentitem.php:11
Bitrix\UI\EntitySelector\RecentItem\jsonSerialize
jsonSerialize()
Definition
recentitem.php:90
Bitrix\UI\EntitySelector\RecentItem\$entityId
$entityId
Definition
recentitem.php:8
Bitrix\UI\EntitySelector\RecentItem\setLoaded
setLoaded(bool $flag)
Definition
recentitem.php:71
Bitrix\UI\EntitySelector\RecentItem\$id
$id
Definition
recentitem.php:7
Bitrix\UI\EntitySelector\RecentItem\setLastUseDate
setLastUseDate(int $lastUseDate)
Definition
recentitem.php:59
Bitrix\UI\EntitySelector\RecentItem\isAvailable
isAvailable()
Definition
recentitem.php:78
Bitrix\UI\EntitySelector\RecentItem\$lastUseDate
$lastUseDate
Definition
recentitem.php:9
Bitrix\UI\EntitySelector
Definition
basefilter.php:2
modules
ui
lib
entityselector
recentitem.php
Создано системой
1.10.0