Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
messagefield.php
1<?php
9
12
13Loc::loadMessages(__FILE__);
14
32class MessageFieldTable extends Entity\DataManager
33{
39 public static function getTableName()
40 {
41 return 'b_sender_message_field';
42 }
43
49 public static function getMap()
50 {
51 return array(
52 'MESSAGE_ID' => array(
53 'data_type' => 'integer',
54 'required' => true,
55 'primary' => true,
56 ),
57 'CODE' => array(
58 'data_type' => 'string',
59 'required' => true,
60 'primary' => true,
61 ),
62 'TYPE' => array(
63 'data_type' => 'string',
64 'required' => true,
65 ),
66 'VALUE' => array(
67 'data_type' => 'text',
68 'save_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getSaveModificator'),
69 'fetch_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getFetchModificator'),
70 ),
71 );
72 }
73
80 public static function deleteByMessageId($messageId)
81 {
82 $items = static::getList([
83 'select' => ['MESSAGE_ID', 'CODE'],
84 'filter' => ['=MESSAGE_ID' => $messageId]
85 ]);
86 foreach ($items as $primary)
87 {
88 $result = static::delete($primary);
89 if (!$result->isSuccess())
90 {
91 return false;
92 }
93 }
94
95 return true;
96 }
97}
static loadMessages($file)
Definition loc.php:64