1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
permission.php
См. документацию.
1<?
2namespace Bitrix\Forum;
3
4use Bitrix\Main\Entity;
5use Bitrix\Main\Localization\Loc;
6use Bitrix\Main\ORM\Fields\Relations\Reference;
7use Bitrix\Main\ORM\Query\Join;
8
35class 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
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}
const CAN_EDIT
Определения permission.php:72
const CAN_ADD_TOPIC
Определения permission.php:70
const FULL_ACCESS
Определения permission.php:73
const ACCESS_DENIED
Определения permission.php:67
const CAN_READ
Определения permission.php:68
static getTitledList()
Определения permission.php:93
const CAN_ADD_MESSAGE
Определения permission.php:69
const CAN_MODERATE
Определения permission.php:71
static getList()
Определения permission.php:79
static getMap()
Определения permission.php:52
static getTableName()
Определения permission.php:42
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195