Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
preselecteditem.php
1
<?php
2
3
namespace
Bitrix\UI\EntitySelector
;
4
5
class
PreselectedItem
implements
\JsonSerializable
6
{
7
protected
$id
;
8
protected
$entityId
;
9
protected
$item
;
10
11
public
function
__construct
(array $options)
12
{
13
$id
= $options[
'id'
] ??
null
;
14
if
((is_string(
$id
) &&
$id
!==
''
) || is_int(
$id
))
15
{
16
$this->
id
=
$id
;
17
}
18
19
$entityId
= $options[
'entityId'
] ??
null
;
20
if
(is_string(
$entityId
) &&
$entityId
!==
''
)
21
{
22
$this->entityId = strtolower(
$entityId
);
23
}
24
}
25
26
public
function
getId
()
27
{
28
return
$this->id
;
29
}
30
31
public
function
getEntityId
(): string
32
{
33
return
$this->entityId
;
34
}
35
36
public
function
setItem
(
Item
$item
)
37
{
38
$this->item =
$item
;
39
}
40
41
public
function
getItem
(): ?
Item
42
{
43
return
$this->item
;
44
}
45
46
public
function
isLoaded
()
47
{
48
return
$this->
getItem
() !==
null
;
49
}
50
51
public
function
jsonSerialize
()
52
{
53
return
[$this->
getEntityId
(), $this->
getId
()];
54
}
55
}
Bitrix\UI\EntitySelector\Item
Definition
item.php:8
Bitrix\UI\EntitySelector\PreselectedItem
Definition
preselecteditem.php:6
Bitrix\UI\EntitySelector\PreselectedItem\getEntityId
getEntityId()
Definition
preselecteditem.php:31
Bitrix\UI\EntitySelector\PreselectedItem\getItem
getItem()
Definition
preselecteditem.php:41
Bitrix\UI\EntitySelector\PreselectedItem\getId
getId()
Definition
preselecteditem.php:26
Bitrix\UI\EntitySelector\PreselectedItem\__construct
__construct(array $options)
Definition
preselecteditem.php:11
Bitrix\UI\EntitySelector\PreselectedItem\isLoaded
isLoaded()
Definition
preselecteditem.php:46
Bitrix\UI\EntitySelector\PreselectedItem\$item
$item
Definition
preselecteditem.php:9
Bitrix\UI\EntitySelector\PreselectedItem\setItem
setItem(Item $item)
Definition
preselecteditem.php:36
Bitrix\UI\EntitySelector\PreselectedItem\jsonSerialize
jsonSerialize()
Definition
preselecteditem.php:51
Bitrix\UI\EntitySelector\PreselectedItem\$entityId
$entityId
Definition
preselecteditem.php:8
Bitrix\UI\EntitySelector\PreselectedItem\$id
$id
Definition
preselecteditem.php:7
Bitrix\UI\EntitySelector
Definition
basefilter.php:2
modules
ui
lib
entityselector
preselecteditem.php
Создано системой
1.10.0