Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
cashboxresthandler.php
1<?php
2
4
11
12Loc::loadMessages(__FILE__);
13
43{
47 public static function getTableName()
48 {
49 return 'b_sale_cashbox_rest_handler';
50 }
51
55 public static function getMap()
56 {
57 return [
58 new IntegerField(
59 'ID',
60 [
61 'primary' => true,
62 'autocomplete' => true,
63 'title' => Loc::getMessage('CASHBOX_REST_HANDLER_ENTITY_ID_FIELD')
64 ]
65 ),
66 new StringField(
67 'NAME',
68 [
69 'required' => true,
70 'validation' => [__CLASS__, 'validateName'],
71 'title' => Loc::getMessage('CASHBOX_REST_HANDLER_ENTITY_NAME_FIELD')
72 ]
73 ),
74 new StringField(
75 'CODE',
76 [
77 'required' => true,
78 'validation' => [__CLASS__, 'validateCode'],
79 'title' => Loc::getMessage('CASHBOX_REST_HANDLER_ENTITY_CODE_FIELD')
80 ]
81 ),
82 new IntegerField(
83 'SORT',
84 [
85 'default' => 100,
86 'title' => Loc::getMessage('CASHBOX_REST_HANDLER_ENTITY_SORT_FIELD')
87 ]
88 ),
89 new TextField(
90 'SETTINGS',
91 [
92 'required' => true,
93 'title' => Loc::getMessage('CASHBOX_REST_HANDLER_ENTITY_SETTINGS_FIELD'),
94 'serialized' => true,
95 ]
96 ),
97 new StringField('APP_ID'),
98 ];
99 }
100
106 public static function validateName()
107 {
108 return [
109 new LengthValidator(null, 255),
110 ];
111 }
112
118 public static function validateCode()
119 {
120 return [
121 new LengthValidator(null, 50),
122 ];
123 }
124}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29