1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
messageparam.php
См. документацию.
1<?php
2namespace Bitrix\Im\Model;
3
4use Bitrix\Main\Entity;
5use Bitrix\Main;
6
7
34
35class MessageParamTable extends Entity\DataManager
36{
42 public static function getTableName()
43 {
44 return 'b_im_message_param';
45 }
46
52 public static function getMap()
53 {
54 return array(
55 'ID' => array(
56 'data_type' => 'integer',
57 'primary' => true,
58 'autocomplete' => true,
59 //'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_ID_FIELD'),
60 ),
61 'MESSAGE_ID' => array(
62 'data_type' => 'integer',
63 'required' => true,
64 //'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_MESSAGE_ID_FIELD'),
65 ),
66 'PARAM_NAME' => array(
67 'data_type' => 'string',
68 'required' => true,
69 'validation' => array(__CLASS__, 'validateParamName'),
70 //'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_PARAM_NAME_FIELD'),
71 ),
72 'PARAM_VALUE' => array(
73 'data_type' => 'string',
74 'validation' => array(__CLASS__, 'validateParamValue'),
75 //'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_PARAM_VALUE_FIELD'),
76 'save_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getSaveModificator'),
77 'fetch_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getFetchModificator'),
78 ),
79 'PARAM_JSON' => array(
80 'data_type' => 'text',
81 //'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_PARAM_JSON_FIELD'),
82 'save_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getSaveModificator'),
83 'fetch_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getFetchModificator'),
84 ),
85 'MESSAGE' => array(
86 'data_type' => 'Bitrix\Im\Model\MessageTable',
87 'reference' => array('=this.MESSAGE_ID' => 'ref.ID'),
88 'join_type' => 'INNER',
89 ),
90 );
91 }
92
97 public static function validateParamName()
98 {
99 return array(
100 new Entity\Validator\Length(null, 100),
101 );
102 }
103
108 public static function validateParamValue()
109 {
110 return array(
111 new Entity\Validator\Length(null, 100),
112 );
113 }
114
120 public static function deleteBatch(array $filter)
121 {
122 $whereSql = \Bitrix\Main\Entity\Query::buildFilterSql(static::getEntity(), $filter);
123
124 if ($whereSql <> '')
125 {
126 $tableName = static::getTableName();
128 $connection->queryExecute("DELETE FROM {$tableName} WHERE {$whereSql}");
129 }
130 }
131}
$connection
Определения actionsdefinitions.php:38
static validateParamValue()
Определения messageparam.php:108
static validateParamName()
Определения messageparam.php:97
static deleteBatch(array $filter)
Определения messageparam.php:120
static getTableName()
Определения messageparam.php:42
static getConnection($name="")
Определения application.php:638
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$filter
Определения iblock_catalog_list.php:54
Определения ufield.php:9