Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
group.php
1
<?php
9
namespace
Bitrix\Main\UI\AccessRights\Entity
;
10
11
12
use
Bitrix\Main\Access\AccessCode
;
13
use
Bitrix\Main\GroupTable
;
14
15
class
Group
extends
EntityBase
16
{
17
private
static
$modelsCache = [];
18
19
public
function
getType
(): string
20
{
21
return
AccessCode::TYPE_GROUP;
22
}
23
24
public
function
getName
(): string
25
{
26
if
($this->model)
27
{
28
return
$this->model->getName();
29
}
30
return
''
;
31
}
32
33
public
function
getUrl
(): string
34
{
35
return
''
;
36
}
37
38
public
function
getAvatar
(
int
$width = 58,
int
$height = 58): ?string
39
{
40
return
''
;
41
}
42
43
protected
function
loadModel
()
44
{
45
if
(!$this->model)
46
{
47
if
(array_key_exists($this->
id
, self::$modelsCache))
48
{
49
$this->model = self::$modelsCache[
$this->id
];
50
}
51
else
52
{
53
$this->model =
GroupTable::getList
([
54
'select'
=> [
55
'ID'
,
56
'NAME'
,
57
],
58
'filter'
=> [
59
'=ID'
=> $this->
id
,
60
],
61
'limit'
=> 1,
62
])->fetchObject();
63
64
self::$modelsCache[
$this->id
] =
$this->model
;
65
}
66
}
67
}
68
}
Bitrix\Main\Access\AccessCode
Definition
accesscode.php:13
Bitrix\Main\GroupTable
Definition
group.php:29
Bitrix\Main\ORM\Data\DataManager\getList
static getList(array $parameters=array())
Definition
datamanager.php:441
Bitrix\Main\UI\AccessRights\Entity\EntityBase
Definition
entitybase.php:13
Bitrix\Main\UI\AccessRights\Entity\EntityBase\$model
$model
Definition
entitybase.php:15
Bitrix\Main\UI\AccessRights\Entity\EntityBase\$id
$id
Definition
entitybase.php:14
Bitrix\Main\UI\AccessRights\Entity\Group
Definition
group.php:16
Bitrix\Main\UI\AccessRights\Entity\Group\getName
getName()
Definition
group.php:24
Bitrix\Main\UI\AccessRights\Entity\Group\loadModel
loadModel()
Definition
group.php:43
Bitrix\Main\UI\AccessRights\Entity\Group\getAvatar
getAvatar(int $width=58, int $height=58)
Definition
group.php:38
Bitrix\Main\UI\AccessRights\Entity\Group\getType
getType()
Definition
group.php:19
Bitrix\Main\UI\AccessRights\Entity\Group\getUrl
getUrl()
Definition
group.php:33
Bitrix\Main\UI\AccessRights\Entity
Definition
accessdirector.php:4
modules
main
lib
ui
accessrights
entity
group.php
Создано системой
1.10.0