Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
rights.php
1<?php
3
4use \Bitrix\Main\Entity;
5use \Bitrix\Main\Localization\Loc;
6
7Loc::loadMessages(__FILE__);
8
25class RightsTable extends Entity\DataManager
26{
31 public static function getTableName()
32 {
33 return 'b_landing_entity_rights';
34 }
35
40 public static function getMap()
41 {
42 return array(
43 'ID' => new Entity\IntegerField('ID', array(
44 'title' => 'ID',
45 'primary' => true,
46 'autocomplete' => true,
47 )),
48 'ENTITY_ID' => new Entity\IntegerField('ENTITY_ID', array(
49 'title' => Loc::getMessage('LANDING_TABLE_FIELD_RIGHT_ENTITY_ID'),
50 'required' => true
51 )),
52 'ENTITY_TYPE' => new Entity\StringField('ENTITY_TYPE', array(
53 'title' => Loc::getMessage('LANDING_TABLE_FIELD_RIGHT_ENTITY_TYPE'),
54 'required' => true
55 )),
56 'TASK_ID' => new Entity\IntegerField('TASK_ID', array(
57 'title' => Loc::getMessage('LANDING_TABLE_FIELD_RIGHT_TASK_ID'),
58 'required' => true
59 )),
60 'ACCESS_CODE' => new Entity\StringField('ACCESS_CODE', array(
61 'title' => Loc::getMessage('LANDING_TABLE_FIELD_RIGHT_ACCESS_CODE'),
62 'required' => true
63 )),
64 'ROLE_ID' => new Entity\IntegerField('ROLE_ID', array(
65 'title' => Loc::getMessage('LANDING_TABLE_FIELD_BY_ROLE_ID'),
66 'default_value' => 0
67 )),
68 'ROLE' => new Entity\ReferenceField(
69 'ROLE',
70 '\Bitrix\Landing\Internals\RoleTable',
71 array('=this.ROLE_ID' => 'ref.ID')
72 ),
73 'USER_ACCESS' => new Entity\ReferenceField(
74 'USER_ACCESS',
75 '\Bitrix\Main\UserAccessTable',
76 array('=this.ACCESS_CODE' => 'ref.ACCESS_CODE'),
77 ['join_type' => 'INNER']
78 ),
79 'TASK_OPERATION' => new Entity\ReferenceField(
80 'TASK_OPERATION',
81 '\Bitrix\Main\TaskOperationTable',
82 array('=this.TASK_ID' => 'ref.TASK_ID')
83 )
84 );
85 }
86}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29