1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
rolesdata.php
См. документацию.
1
<?php
2
namespace
Bitrix\Scale;
3
8
class
RolesData
9
{
16
public
static
function
getRole
($roleId)
17
{
18
if
($roleId ==
''
)
19
throw
new \Bitrix\Main\ArgumentNullException(
"roleId"
);
20
21
$rolesDefinitions
=
self::getList
();
22
$result
=
array
();
23
24
if
(isset(
$rolesDefinitions
[$roleId]))
25
$result
=
$rolesDefinitions
[$roleId];
26
27
return
$result
;
28
}
29
34
public
static
function
getList
()
35
{
36
static
$def
=
null
;
37
38
if
(
$def
==
null
)
39
{
40
$filename
=
\Bitrix\Main\Application::getDocumentRoot
().
"/bitrix/modules/scale/include/rolesdefinitions.php"
;
41
$file = new \Bitrix\Main\IO\File(
$filename
);
42
43
if
($file->isExists())
44
require_once(
$filename
);
45
else
46
throw
new \Bitrix\Main\IO\FileNotFoundException(
$filename
);
47
48
if
(isset(
$rolesDefinitions
))
49
$def
=
$rolesDefinitions
;
50
else
51
$def
=
array
();
52
}
53
54
return
$def
;
55
}
56
62
public
static
function
getGraphsCategories
($roleId)
63
{
64
if
($roleId ==
''
)
65
throw
new \Bitrix\Main\ArgumentNullException(
"roleId"
);
66
67
$result
=
array
();
68
$role = static::getRole($roleId);
69
70
if
(isset($role[
"GRAPH_CATEGORIES"
]))
71
$result
= $role[
"GRAPH_CATEGORIES"
];
72
73
return
$result
;
74
}
75
}
Bitrix\Main\Application\getDocumentRoot
static getDocumentRoot()
Определения
application.php:736
Bitrix\Scale\RolesData
Определения
rolesdata.php:9
Bitrix\Scale\RolesData\getGraphsCategories
static getGraphsCategories($roleId)
Определения
rolesdata.php:62
Bitrix\Scale\RolesData\getRole
static getRole($roleId)
Определения
rolesdata.php:16
Bitrix\Scale\RolesData\getList
static getList()
Определения
rolesdata.php:34
$filename
$filename
Определения
file_edit.php:47
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
$rolesDefinitions
$rolesDefinitions
Определения
rolesdefinitions.php:7
$def
foreach($arTemplatesList as $templ) if(mb_strpos($templ["NAME"] $def
Определения
template_copy.php:264
bitrix
modules
scale
lib
rolesdata.php
Создано системой
1.14.0