Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
department.php
1
<?php
9
namespace
Bitrix\Main\UI\AccessRights\Entity
;
10
11
12
use
Bitrix\Main\Access\AccessCode
;
13
14
class
Department
extends
EntityBase
15
{
16
17
public
function
getType
(): string
18
{
19
return
AccessCode::TYPE_DEPARTMENT;
20
}
21
22
public
function
getName
(): string
23
{
24
if
($this->model)
25
{
26
return
$this->model[
'NAME'
];
27
}
28
return
''
;
29
}
30
31
public
function
getUrl
(): string
32
{
33
return
'/company/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT='
. $this->
getId
();
34
}
35
36
public
function
getAvatar
(
int
$width = 58,
int
$height = 58): ?string
37
{
38
return
''
;
39
}
40
41
protected
function
loadModel
()
42
{
43
if
(!$this->model)
44
{
45
$structure = \CIntranetUtils::GetStructure();
46
if
(array_key_exists($this->
getId
(), $structure[
'DATA'
]))
47
{
48
$this->model = $structure[
'DATA'
][$this->
getId
()];
49
}
50
}
51
52
return
$this->model
;
53
}
54
}
Bitrix\Main\Access\AccessCode
Definition
accesscode.php:13
Bitrix\Main\UI\AccessRights\Entity\Department
Definition
department.php:15
Bitrix\Main\UI\AccessRights\Entity\Department\getName
getName()
Definition
department.php:22
Bitrix\Main\UI\AccessRights\Entity\Department\loadModel
loadModel()
Definition
department.php:41
Bitrix\Main\UI\AccessRights\Entity\Department\getAvatar
getAvatar(int $width=58, int $height=58)
Definition
department.php:36
Bitrix\Main\UI\AccessRights\Entity\Department\getType
getType()
Definition
department.php:17
Bitrix\Main\UI\AccessRights\Entity\Department\getUrl
getUrl()
Definition
department.php:31
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\getId
getId()
Definition
entitybase.php:23
Bitrix\Main\UI\AccessRights\Entity
Definition
accessdirector.php:4
modules
main
lib
ui
accessrights
entity
department.php
Создано системой
1.10.0