1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
roledictionary.php
См. документацию.
1<?php
8
9namespace Bitrix\Main\Access\Role;
10
11use Bitrix\Main\Localization\Loc;
12
13abstract class RoleDictionary
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}
static getRoleName(string $code)
Определения roledictionary.php:18
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
$name
Определения menu_edit.php:35