Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
group.php
1<?php
9
10use Bitrix\Main;
14
15Loc::loadMessages(__FILE__);
16
34{
35 public static function getFilePath()
36 {
37 return __FILE__;
38 }
39
40 public static function getTableName()
41 {
42 return 'b_sale_location_group_lang'; // "_lang", not "_name" because we use an old table
43 }
44
45 public static function getLanguageFieldName()
46 {
47 return 'LID';
48 }
49
50 public static function getReferenceFieldName()
51 {
52 return 'LOCATION_GROUP_ID';
53 }
54
55 public static function getMap()
56 {
57 return array(
58
59 'ID' => array(
60 'data_type' => 'integer',
61 'primary' => true,
62 'autocomplete' => true,
63 ),
64 'NAME' => array(
65 'data_type' => 'string',
66 'required' => true,
67 'title' => Loc::getMessage('SALE_LOCATION_NAME_GROUP_ENTITY_NAME_FIELD')
68 ),
69 'LID' => array(
70 'data_type' => 'string',
71 'required' => true,
72 'title' => Loc::getMessage('SALE_LOCATION_NAME_GROUP_ENTITY_LANGUAGE_ID_FIELD')
73 ),
74 // alias for LID
75 'LANGUAGE_ID' => array(
76 'data_type' => 'string',
77 'expression' => array(
78 '%s',
79 'LID'
80 ),
81 'title' => Loc::getMessage('SALE_LOCATION_NAME_GROUP_ENTITY_LANGUAGE_ID_FIELD')
82 ),
83
84 'LOCATION_GROUP_ID' => array(
85 'data_type' => 'integer',
86 'title' => Loc::getMessage('SALE_LOCATION_NAME_GROUP_ENTITY_LOCATION_GROUP_ID_FIELD')
87 ),
88 // alias for LOCATION_GROUP_ID
89 'GROUP_ID' => array(
90 'data_type' => 'integer',
91 'expression' => array(
92 '%u',
93 'LOCATION_GROUP_ID'
94 ),
95 'title' => Loc::getMessage('SALE_LOCATION_NAME_GROUP_ENTITY_LOCATION_GROUP_ID_FIELD')
96 ),
97
98 // virtual
99 'GROUP' => array(
100 'data_type' => '\Bitrix\Sale\Location\Group',
101 'required' => true,
102 'reference' => array(
103 '=this.LOCATION_GROUP_ID' => 'ref.ID'
104 )
105 ),
106
107 'CNT' => array(
108 'data_type' => 'integer',
109 'expression' => array(
110 'count(*)'
111 )
112 ),
113 );
114 }
115}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29