Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
logcomment.php
1<?php
9
12
30{
31 public static function getTableName()
32 {
33 return 'b_sonet_log_comment';
34 }
35
36 public static function getUfId()
37 {
38 return 'SONET_COMMENT';
39 }
40
41 public static function getMap()
42 {
43 $fieldsMap = array(
44 'ID' => array(
45 'data_type' => 'integer',
46 'primary' => true,
47 'autocomplete' => true,
48 ),
49 'LOG_ID' => array(
50 'data_type' => 'integer',
51 ),
52 'LOG' => array(
53 'data_type' => 'Bitrix\Socialnetwork\LogTable',
54 'reference' => array('=this.LOG_ID' => 'ref.ID'),
55 ),
56 'EVENT_ID' => array(
57 'data_type' => 'string',
58 ),
59 'USER_ID' => array(
60 'data_type' => 'integer',
61 ),
62 'MESSAGE' => array(
63 'data_type' => 'text',
64 ),
65 'SOURCE_ID' => array(
66 'data_type' => 'integer',
67 ),
68 'LOG_DATE' => array(
69 'data_type' => 'datetime',
70 ),
71 'SHARE_DEST' => array(
72 'data_type' => 'string',
73 ),
74 'RATING_TYPE_ID' => array(
75 'data_type' => 'string',
76 ),
77 'RATING_ENTITY_ID' => array(
78 'data_type' => 'integer',
79 ),
80 );
81
82 return $fieldsMap;
83 }
84
85 public static function onAfterDelete(ORM\Event $event)
86 {
87 $result = new ORM\EventResult;
88 $primary = $event->getParameter('primary');
89 $commentId = (!empty($primary['ID']) ? (int)$primary['ID'] : 0);
90
91 if ($commentId > 0)
92 {
93 LogIndex::deleteIndex(array(
95 'itemId' => $commentId
96 ));
97
100 'itemId' => $commentId
101 ));
102 }
103
104 return $result;
105 }
106}
static onAfterDelete(ORM\Event $event)
static deleteByItem($params=array())
Definition logtag.php:86