Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
deliveryresthandlertable.php
1<?php
3
10
11Loc::loadMessages(__FILE__);
12
44{
50 public static function getTableName()
51 {
52 return 'b_sale_delivery_rest_handler';
53 }
54
61 public static function getMap()
62 {
63 return [
64 new IntegerField(
65 'ID',
66 [
67 'primary' => true,
68 'autocomplete' => true,
69 'title' => Loc::getMessage('DELIVERY_REST_HANDLER_ENTITY_ID_FIELD')
70 ]
71 ),
72 new StringField(
73 'NAME',
74 [
75 'required' => true,
76 'validation' => [__CLASS__, 'validateName'],
77 'title' => Loc::getMessage('DELIVERY_REST_HANDLER_ENTITY_NAME_FIELD')
78 ]
79 ),
80 new StringField(
81 'CODE',
82 [
83 'required' => true,
84 'validation' => [__CLASS__, 'validateCode'],
85 'title' => Loc::getMessage('DELIVERY_REST_HANDLER_ENTITY_CODE_FIELD')
86 ]
87 ),
88 new IntegerField(
89 'SORT',
90 [
91 'default' => 100,
92 'title' => Loc::getMessage('DELIVERY_REST_HANDLER_ENTITY_SORT_FIELD')
93 ]
94 ),
95 new TextField(
96 'DESCRIPTION',
97 [
98 'title' => Loc::getMessage('DELIVERY_REST_HANDLER_ENTITY_DESCRIPTION_FIELD')
99 ]
100 ),
101 new TextField(
102 'SETTINGS',
103 [
104 'required' => true,
105 'title' => Loc::getMessage('DELIVERY_REST_HANDLER_ENTITY_SETTINGS_FIELD'),
106 'serialized' => true
107 ]
108 ),
109 new TextField(
110 'PROFILES',
111 [
112 'required' => true,
113 'title' => Loc::getMessage('DELIVERY_REST_HANDLER_ENTITY_PROFILES_FIELD'),
114 'serialized' => true
115 ]
116 ),
117 new StringField('APP_ID'),
118 ];
119 }
120
127 public static function validateName()
128 {
129 return [
130 new LengthValidator(null, 255),
131 ];
132 }
133
140 public static function validateCode()
141 {
142 return [
143 new LengthValidator(null, 50),
144 ];
145 }
146}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29