Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
roledictionary.php
1
<?php
9
namespace
Bitrix\Main\Access\Role
;
10
11
use
Bitrix\Main\Localization\Loc
;
12
13
abstract
class
RoleDictionary
14
implements
AccessibleRoleDictionary
15
{
16
protected
static
$locLoaded
= [];
17
18
public
static
function
getRoleName
(
string
$code): string
19
{
20
static::loadLoc();
21
22
$name =
Loc::getMessage
($code);
23
if
($name)
24
{
25
return
$name;
26
}
27
return
$code;
28
}
29
30
protected
static
function
loadLoc
()
31
{
32
if
(
33
!array_key_exists(static::class, static::$locLoaded)
34
|| !static::$locLoaded[static::class]
35
)
36
{
37
$r = new \ReflectionClass(static::class);
38
Loc::loadMessages
($r->getFileName());
39
static::$locLoaded[static::class] =
true
;
40
}
41
}
42
}
Bitrix\Main\Access\Role\RoleDictionary
Definition
roledictionary.php:15
Bitrix\Main\Access\Role\RoleDictionary\loadLoc
static loadLoc()
Definition
roledictionary.php:30
Bitrix\Main\Access\Role\RoleDictionary\$locLoaded
static $locLoaded
Definition
roledictionary.php:16
Bitrix\Main\Access\Role\RoleDictionary\getRoleName
static getRoleName(string $code)
Definition
roledictionary.php:18
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Main\Access\Role\AccessibleRoleDictionary
Definition
accessibleroledictionary.php:13
Bitrix\Main\Access\Role
Definition
accessibleroledictionary.php:9
modules
main
lib
access
role
roledictionary.php
Создано системой
1.10.0