Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
message.php
1<?php
9
12
13Loc::loadMessages(__FILE__);
14
32class MessageTable extends Entity\DataManager
33{
39 public static function getTableName()
40 {
41 return 'b_sender_message';
42 }
43
49 public static function getMap()
50 {
51 return array(
52 'ID' => array(
53 'data_type' => 'integer',
54 'primary' => true,
55 'autocomplete' => true,
56 ),
57 'CODE' => array(
58 'data_type' => 'string',
59 'required' => true,
60 ),
61 'UTM' => array(
62 'data_type' => MessageUtmTable::class,
63 'reference' => array('=this.ID' => 'ref.MESSAGE_ID'),
64 ),
65 );
66 }
67
74 public static function onAfterDelete(Entity\Event $event)
75 {
76 $result = new Entity\EventResult;
77 $data = $event->getParameters();
78
79 MessageFieldTable::deleteByMessageId($data['primary']['ID']);
80
81 return $result;
82 }
83}
static loadMessages($file)
Definition loc.php:64
static onAfterDelete(Entity\Event $event)
Definition message.php:74