1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
permission.php
См. документацию.
1
<?
2
namespace
Bitrix\Forum;
3
4
use Bitrix\Main\Entity;
5
use Bitrix\Main\Localization\Loc;
6
use Bitrix\Main\ORM\Fields\Relations\Reference;
7
use Bitrix\Main\ORM\Query\Join;
8
35
class
PermissionTable
extends
Entity\DataManager
36
{
42
public
static
function
getTableName
()
43
{
44
return
'b_forum_perms'
;
45
}
46
52
public
static
function
getMap
()
53
{
54
return
[
55
new
Entity\IntegerField(
'ID'
, [
'primary'
=>
true
,
'autocomplete'
=>
true
]),
56
new
Entity\IntegerField(
'FORUM_ID'
),
57
new
Entity\IntegerField(
'GROUP_ID'
),
58
new
Entity\StringField(
'PERMISSION'
, [
'size'
=> 1]),
59
new
Reference
(
"GROUP"
, \
Bitrix
\
Main
\GroupTable::class, Join::on(
"this.ID"
,
"ref.GROUP_ID"
))
60
];
61
}
62
}
63
64
65
// A < E < I < M < Q < U < Y
66
class
Permission
{
67
public
const
ACCESS_DENIED
=
"A"
;
68
public
const
CAN_READ
=
"E"
;
69
public
const
CAN_ADD_MESSAGE
=
"I"
;
70
public
const
CAN_ADD_TOPIC
=
"M"
;
71
public
const
CAN_MODERATE
=
"Q"
;
72
public
const
CAN_EDIT
=
"U"
;
73
public
const
FULL_ACCESS
=
"Y"
;
74
79
public
static
function
getList
()
80
{
81
$res
= (new \ReflectionClass(__CLASS__))->getConstants();
82
$result
=
array
();
83
foreach
(
$res
as
$code
=> $id)
84
{
85
$result
[$id] =
$code
;
86
}
87
return
$result
;
88
}
89
93
public
static
function
getTitledList
()
94
{
95
$res
= (new \ReflectionClass(__CLASS__))->getConstants();
96
$result
=
array
();
97
foreach
(
$res
as
$code
=> $id)
98
{
99
$result
[$id] = Loc::getMessage(
"FORUM_PERMISSION_"
.
$code
);
100
}
101
return
$result
;
102
}
103
}
Bitrix\Forum\Permission
Определения
permission.php:66
Bitrix\Forum\Permission\CAN_EDIT
const CAN_EDIT
Определения
permission.php:72
Bitrix\Forum\Permission\CAN_ADD_TOPIC
const CAN_ADD_TOPIC
Определения
permission.php:70
Bitrix\Forum\Permission\FULL_ACCESS
const FULL_ACCESS
Определения
permission.php:73
Bitrix\Forum\Permission\ACCESS_DENIED
const ACCESS_DENIED
Определения
permission.php:67
Bitrix\Forum\Permission\CAN_READ
const CAN_READ
Определения
permission.php:68
Bitrix\Forum\Permission\getTitledList
static getTitledList()
Определения
permission.php:93
Bitrix\Forum\Permission\CAN_ADD_MESSAGE
const CAN_ADD_MESSAGE
Определения
permission.php:69
Bitrix\Forum\Permission\CAN_MODERATE
const CAN_MODERATE
Определения
permission.php:71
Bitrix\Forum\Permission\getList
static getList()
Определения
permission.php:79
Bitrix\Forum\PermissionTable
Определения
permission.php:36
Bitrix\Forum\PermissionTable\getMap
static getMap()
Определения
permission.php:52
Bitrix\Forum\PermissionTable\getTableName
static getTableName()
Определения
permission.php:42
Bitrix\Main\ORM\Fields\Relations\Reference
Определения
reference.php:26
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$res
$res
Определения
filter_act.php:7
$result
$result
Определения
get_property_values.php:14
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
Bitrix\Main
Bitrix
bitrix
modules
forum
lib
permission.php
Создано системой
1.14.0