Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
commandlang.php
1<?php
2namespace Bitrix\Im\Model;
3
5
34class CommandLangTable extends Main\Entity\DataManager
35{
41 public static function getTableName()
42 {
43 return 'b_im_command_lang';
44 }
45
51 public static function getMap()
52 {
53 return array(
54 'ID' => array(
55 'data_type' => 'integer',
56 'primary' => true,
57 'autocomplete' => true,
58 //'title' => Loc::getMessage('COMMAND_LANG_ENTITY_ID_FIELD'),
59 ),
60 'COMMAND_ID' => array(
61 'data_type' => 'integer',
62 'required' => true,
63 //'title' => Loc::getMessage('COMMAND_LANG_ENTITY_COMMAND_ID_FIELD'),
64 ),
65 'LANGUAGE_ID' => array(
66 'data_type' => 'string',
67 'required' => true,
68 'validation' => array(__CLASS__, 'validateLanguageId'),
69 //'title' => Loc::getMessage('COMMAND_LANG_ENTITY_LANGUAGE_ID_FIELD'),
70 ),
71 'TITLE' => array(
72 'data_type' => 'string',
73 'validation' => array(__CLASS__, 'validateTitle'),
74 //'title' => Loc::getMessage('COMMAND_LANG_ENTITY_TITLE_FIELD'),
75 'save_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getSaveModificator'),
76 'fetch_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getFetchModificator'),
77 ),
78 'PARAMS' => array(
79 'data_type' => 'string',
80 'validation' => array(__CLASS__, 'validateParams'),
81 //'title' => Loc::getMessage('COMMAND_LANG_ENTITY_PARAMS_FIELD'),
82 'save_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getSaveModificator'),
83 'fetch_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getFetchModificator'),
84 ),
85 );
86 }
92 public static function validateLanguageId()
93 {
94 return array(
95 new Main\Entity\Validator\Length(null, 2),
96 );
97 }
103 public static function validateTitle()
104 {
105 return array(
106 new Main\Entity\Validator\Length(null, 255),
107 );
108 }
114 public static function validateParams()
115 {
116 return array(
117 new Main\Entity\Validator\Length(null, 255),
118 );
119 }
120}