Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
servicecomment.php
1<?php
2
10
22
24{
25 public static function processBlogCreateEntity($params): bool
26 {
27 $entityType = ($params['ENTITY_TYPE'] ?? false);
28 $entityId = (int)($params['ENTITY_ID'] ?? 0);
29 $sourceEntityType = (isset($params['SOURCE_ENTITY_TYPE']) && in_array($params['SOURCE_ENTITY_TYPE'], [ 'BLOG_POST', 'BLOG_COMMENT' ]) ? $params['SOURCE_ENTITY_TYPE'] : false);
30 $sourceEntityId = (int)($params['SOURCE_ENTITY_ID'] ?? 0);
31 $logId = 0;
32
33 if (
34 empty($sourceEntityType)
35 || $sourceEntityId <= 0
36 || empty($entityType)
37 || $entityId <= 0
38 || !Loader::includeModule('blog')
39 )
40 {
41 return false;
42 }
43
44 $entity = static::getEntityData([
45 'entityType' => $entityType,
46 'entityId' => $entityId,
47 ]);
48
49 if (empty($entity))
50 {
51 return false;
52 }
53
54 $source = static::getSourceData([
55 'sourceEntityType' => $sourceEntityType,
56 'sourceEntityId' => $sourceEntityId,
57 ]);
58
59 if (empty($source))
60 {
61 return false;
62 }
63
64 $authorId = static::getEntityAuthorId([
65 'entityType' => $entityType,
66 'entityData' => $entity,
67 ]);
68 $userIP = \CBlogUser::getUserIP();
69 $auxText = CommentAux\CreateEntity::getPostText();
70
71 $logCommentFields = [
72 'POST_ID' => $source['post']['ID'],
73 'BLOG_ID' => $source['post']['BLOG_ID'],
74 'POST_TEXT' => $auxText,
75 'DATE_CREATE' => convertTimeStamp(time() + \CTimeZone::getOffset(), 'FULL'),
76 'AUTHOR_IP' => $userIP[0],
77 'AUTHOR_IP1' => $userIP[1],
78 'PARENT_ID' => false,
79 'AUTHOR_ID' => $authorId,
80 'SHARE_DEST' => Json::encode([
81 'sourceType' => $sourceEntityType,
82 'sourceId' => $sourceEntityId,
83 'entityType' => $entityType,
84 'entityId' => $entityId,
85 ]),
86 ];
87
88 $entityLivefeedPovider = Provider::getProvider($sourceEntityType);
89 $entityLivefeedPovider->setEntityId($sourceEntityId);
90 $entityLivefeedPovider->initSourceFields();
91
92 $url = $entityLivefeedPovider->getLiveFeedUrl();
93 if (!empty($url))
94 {
95 $metaData = UrlPreview::getMetadataAndHtmlByUrl($url, true, false);
96
97 if (
98 !empty($metaData)
99 && !empty($metaData['ID'])
100 && (int)$metaData['ID'] > 0
101 )
102 {
103 $signer = new Signer();
104 $logCommentFields['UF_BLOG_COMM_URL_PRV'] = $signer->sign($metaData['ID'] . '', UrlPreview::SIGN_SALT);
105 }
106 }
107
108 $newCommentId = \CBlogComment::add($logCommentFields, false);
109 if (!$newCommentId)
110 {
111 return false;
112 }
113
114 BXClearCache(true, '/blog/comment/' . (int)($source['post']['ID'] / 100) . '/' . $source['post']['ID'] . '/');
115
116 $blogPostLivefeedProvider = new Livefeed\BlogPost;
117
118 $res = \CSocNetLog::getList(
119 [],
120 [
121 'EVENT_ID' => $blogPostLivefeedProvider->getEventId(),
122 'SOURCE_ID' => $source['post']['ID']
123 ],
124 false,
125 [ 'nTopCount' => 1 ],
126 [ 'ID' ]
127 );
128 if ($log = $res->fetch())
129 {
130 $logId = (int)$log['ID'];
131 }
132
133 if ($logId > 0)
134 {
135 $connection = Application::getConnection();
136 $helper = $connection->getSqlHelper();
137
138 $logCommentFields = [
139 'ENTITY_TYPE' => SONET_ENTITY_USER,
140 'ENTITY_ID' => $source['post']['AUTHOR_ID'],
141 'EVENT_ID' => 'blog_comment',
142 '=LOG_DATE' => $helper->getCurrentDateTimeFunction(),
143 'LOG_ID' => $logId,
144 'USER_ID' => $authorId,
145 'MESSAGE' => $auxText,
146 'TEXT_MESSAGE' => $auxText,
147 'MODULE_ID' => false,
148 'SOURCE_ID' => $newCommentId,
149 'RATING_TYPE_ID' => 'BLOG_COMMENT',
150 'RATING_ENTITY_ID' => $newCommentId,
151 ];
152
153 \CSocNetLogComments::add($logCommentFields, false, false);
154
155 if (
156 isset($params['LIVE'])
157 && $params['LIVE'] === 'Y'
158 )
159 {
160 $userPage = Option::get('socialnetwork', 'user_page', SITE_DIR . 'company/personal/');
161 $userPath = $userPage . 'user/' . $source['post']['AUTHOR_ID'] . '/';
162
163 $auxLiveParamList = static::getAuxLiveParams([
164 'sourceEntityType' => $sourceEntityType,
165 'sourceEntityId' => $sourceEntityId,
166 'sourceData' => $source,
167 'entityType' => $entityType,
168 'entityId' => $entityId,
169 'entityData' => $entity,
170 'userPath' => $userPath,
171 'logId' => $logId,
172 ]);
173
174 $provider = CommentAux\Base::init(CommentAux\CreateEntity::getType(), [
175 'liveParamList' => $auxLiveParamList
176 ]);
177
178 \CBlogComment::addLiveComment($newCommentId, [
179 'PATH_TO_USER' => $userPath,
180 'LOG_ID' => $logId,
181 'MODE' => 'PULL_MESSAGE',
182 'AUX' => 'createentity',
183 'AUX_LIVE_PARAMS' => $provider->getLiveParams(),
184 ]);
185 }
186 }
187
188 return true;
189 }
190
191 public static function processLogEntryCreateEntity(array $params = []): bool
192 {
193 $entityType = ($params['ENTITY_TYPE'] ?? false);
194 $entityId = (int)($params['ENTITY_ID'] ?? 0);
195 $postEntityType = ($params['POST_ENTITY_TYPE'] ?? false);
196 $sourceEntityType = ($params['SOURCE_ENTITY_TYPE'] ?? false);
197 $sourceEntityId = (int)($params['SOURCE_ENTITY_ID'] ?? 0);
198 $sourceEntityData = (array)($params['SOURCE_ENTITY_DATA'] ?? []);
199 $logId = (int)($params['LOG_ID'] ?? 0);
200 $siteId = ($params['SITE_ID'] ?? SITE_ID);
201
202 if (in_array($sourceEntityType, [ CommentAux\CreateEntity::SOURCE_TYPE_BLOG_POST, CommentAux\CreateEntity::SOURCE_TYPE_BLOG_COMMENT], true))
203 {
205 'ENTITY_TYPE' => $entityType,
206 'ENTITY_ID' => $entityId,
207 'SOURCE_ENTITY_TYPE' => $sourceEntityType,
208 'SOURCE_ENTITY_ID' => $sourceEntityId,
209 'LIVE' => 'Y',
210 ]);
211 }
212
213 if (
214 empty($postEntityType)
215 || empty($sourceEntityType)
216 || $sourceEntityId <= 0
217 || empty($entityType)
218 || $entityId <= 0
219 )
220 {
221 return false;
222 }
223
224 $entity = static::getEntityData([
225 'entityType' => $entityType,
226 'entityId' => $entityId,
227 ]);
228
229 if (empty($entity))
230 {
231 return false;
232 }
233
234 $res = \CSite::getById($siteId);
235 $site = $res->fetch();
236
237 $provider = Livefeed\Provider::init([
238 'ENTITY_TYPE' => $sourceEntityType,
239 'ENTITY_ID' => $sourceEntityId,
240 'ADDITIONAL_PARAMS' => $sourceEntityData,
241 'LOG_ID' => $logId
242 ]);
243
244 if (!$provider)
245 {
246 return false;
247 }
248
249 $commentProvider = false;
250 if ($postProvider = Livefeed\Provider::getProvider($postEntityType))
251 {
252 $commentProvider = $postProvider->getCommentProvider();
253 }
254
255 if (!$commentProvider)
256 {
257 return false;
258 }
259
260 if ($postProvider::className() === $provider::className())
261 {
262 $commentProvider->setParentProvider($provider);
263 }
264 else
265 {
266 $postEntityId = $provider->getParentEntityId();
267 $postProvider->setEntityId($postEntityId);
268 $commentProvider->setParentProvider($postProvider);
269 }
270
271 $logId = $provider->getLogId();
272
273 if ($logId <= 0)
274 {
275 $provider->initSourceFields();
276 $logId = $provider->getLogId();
277 }
278
279 if ($logId > 0)
280 {
281 $commentProvider->setLogId($provider->getLogId());
282 }
283
284 $auxData = [
285 'sourceType' => $sourceEntityType,
286 'sourceId' => $sourceEntityId,
287 'entityType' => $entityType,
288 'entityId' => $entityId,
289 ];
290
291 $authorId = static::getEntityAuthorId([
292 'entityType' => $entityType,
293 'entityData' => $entity,
294 ]);
295
296 $sonetCommentData = $commentProvider->add([
297 'SITE_ID' => $siteId,
298 'AUTHOR_ID' => $authorId,
299 'MESSAGE' => CommentAux\CreateEntity::getPostText(),
300 'SHARE_DEST' => Json::encode($auxData),
301 'AUX' => 'Y',
302 'AUX_DATA' => $auxData,
303 'MODULE' => false,
304 ]);
305
306 $sonetCommentId = (int)($sonetCommentData['sonetCommentId'] ?? 0);
307 $sourceCommentId = (int)($sonetCommentData['sourceCommentId'] ?? 0);
308
309 if (
310 $sonetCommentId <= 0
311 && $sourceCommentId <= 0
312 )
313 {
314 return false;
315 }
316
317 if (
318 isset($params['LIVE'])
319 && $params['LIVE'] === 'Y'
320 )
321 {
322 $userPage = Option::get('socialnetwork', 'user_page', $site['DIR'] . 'company/personal/');
323 $provider->initSourceFields();
324
325 $auxLiveParamList = static::getAuxLiveParams([
326 'sourceEntityType' => $sourceEntityType,
327 'sourceEntityId' => $sourceEntityId,
328 'entityType' => $entityType,
329 'entityId' => $entityId,
330 'entityData' => $entity,
331 'sourceEntityLink' => $provider->getLiveFeedUrl(),
332 ]);
333
334 $liveCommentParams = [
335 'ACTION' => 'ADD',
336 'TIME_FORMAT' => \CSite::getTimeFormat(),
337 'NAME_TEMPLATE' => \CSite::getNameFormat(null, $siteId),
338 'SHOW_LOGIN' => 'N',
339 'AVATAR_SIZE' => 100,
340 'LANGUAGE_ID' => $site['LANGUAGE_ID'],
341 'SITE_ID' => $siteId,
342 'PULL' => 'Y',
343 'AUX' => 'createentity',
344 ];
345
346 if ($sonetCommentId > 0)
347 {
348 $logCommentFields = \Bitrix\Socialnetwork\Item\LogComment::getById($sonetCommentId)->getFields();
349
350 $res = LogTable::getList([
351 'filter' => [
352 '=ID' => $logCommentFields['LOG_ID']
353 ],
354 'select' => [ 'ID', 'ENTITY_TYPE', 'ENTITY_ID', 'USER_ID', 'EVENT_ID', 'SOURCE_ID' ],
355 ]);
356 if (!($logEntry = $res->fetch()))
357 {
358 return false;
359 }
360
361 $userPath = $userPage . 'user/' . $logEntry['USER_ID'] . '/';
362
363 $auxLiveParamList['userPath'] = $userPath;
364
365 $serviceCommentProvider = CommentAux\Base::init(
366 CommentAux\CreateEntity::getType(),
367 [
368 'liveParamList' => $auxLiveParamList,
369 ]
370 );
371
372 $commentEvent = \CSocNetLogTools::findLogCommentEventByLogEventID($logEntry['EVENT_ID']);
373
374 $liveCommentParams['SOURCE_ID'] = $logCommentFields['SOURCE_ID'];
375 $liveCommentParams['PATH_TO_USER'] = $userPath;
376 $liveCommentParams['AUX_LIVE_PARAMS'] = $serviceCommentProvider->getLiveParams();
377
378 if ($commentProvider->getContentTypeId() === Livefeed\ForumPost::CONTENT_TYPE_ID)
379 {
380 $feedParams = $commentProvider->getFeedParams();
381 if (!empty($feedParams['xml_id']))
382 {
383 $liveCommentParams['ENTITY_XML_ID'] = $feedParams['xml_id'];
384 }
385 }
386
388 $logCommentFields,
389 $logEntry,
390 $commentEvent,
391 $liveCommentParams
392 );
393 }
394 elseif ($sourceCommentId > 0)
395 {
396 $commentProvider->setEntityId($sourceCommentId);
397 $commentProvider->initSourceFields();
398
399 $serviceCommentProvider = CommentAux\Base::init(
400 CommentAux\CreateEntity::getType(),
401 [
402 'liveParamList' => $auxLiveParamList,
403 ]
404 );
405
407 'postProvider' => $postProvider,
408 'commentProvider' => $commentProvider,
409 'siteId' => $siteId,
410 'languageId' => $site['LANGUAGE_ID'],
411 'nameTemplate' => \CSite::getNameFormat(null, $siteId),
412 'showLogin' => 'N',
413 'avatarSize' => 100,
414 'aux' => 'createentity',
415 'auxLiveParams' => $serviceCommentProvider->getLiveParams()
416 ]);
417 }
418 }
419
420 return true;
421 }
422
423 public static function getEntityData(array $params = [])
424 {
425 global $USER;
426
427 static $cache = [];
428
429 $result = false;
430
431 $entityType = ($params['entityType'] ?? false);
432 $entityId = (int)($params['entityId'] ?? 0);
433
434 if (
435 !$entityType
436 || $entityId <= 0
437 )
438 {
439 return $result;
440 }
441
442 $cacheKey = $entityType . '_' . $entityId;
443
444 if (isset($cache[$cacheKey]))
445 {
446 return $cache[$cacheKey];
447 }
448
449 switch ($entityType)
450 {
451 case CommentAux\CreateEntity::ENTITY_TYPE_TASK:
452 if (
453 Loader::includeModule('tasks')
454 && ($task = \Bitrix\Tasks\Manager\Task::get($USER->getId(), $entityId))
455 )
456 {
457 $result = $task['DATA'];
458 }
459 break;
460 case CommentAux\CreateEntity::ENTITY_TYPE_BLOG_POST:
461
462 $provider = new Livefeed\BlogPost();
463 $provider->setOption('checkAccess', true);
464 $provider->setEntityId($entityId);
465 $provider->initSourceFields();
466
467 $post = $provider->getSourceFields();
468 if (!empty($post))
469 {
470 $post['URL'] = $provider->getLiveFeedUrl();
471 $result = $post;
472 }
473 break;
474 case CommentAux\CreateEntity::ENTITY_TYPE_CALENDAR_EVENT:
475 if (Loader::includeModule('calendar'))
476 {
477 $res = \CCalendarEvent::getList(
478 [
479 'arFilter' => [
480 'ID' => $entityId,
481 ],
482 'parseRecursion' => false,
483 'fetchAttendees' => false,
484 'checkPermissions' => true,
485 'setDefaultLimit' => false
486 ]
487 );
488
489 if (is_array($res) && is_array($res[0]))
490 {
491 $result = $res[0];
492 }
493 }
494 break;
495 default:
496 }
497
498 $cache[$cacheKey] = $result;
499
500 return $result;
501 }
502
503 public static function getEntityAuthorId(array $params = []): int
504 {
505 $result = 0;
506
507 $entityType = ($params['entityType'] ?? false);
508 $entityData = ($params['entityData'] ?? []);
509
510 if (
511 !$entityType
512 || empty($entityData)
513 || !is_array($entityData)
514 )
515 {
516 return $result;
517 }
518
519 switch ($entityType)
520 {
521 case CommentAux\CreateEntity::ENTITY_TYPE_TASK:
522 $result = (isset($entityData['CREATED_BY']) ? (int)$entityData['CREATED_BY'] : 0);
523 break;
524 case CommentAux\CreateEntity::ENTITY_TYPE_BLOG_POST:
525 $result = (isset($entityData['AUTHOR_ID']) ? (int)$entityData['AUTHOR_ID'] : 0);
526 break;
527 case CommentAux\CreateEntity::ENTITY_TYPE_CALENDAR_EVENT:
528 $result = (isset($entityData['OWNER_ID']) ? (int)$entityData['OWNER_ID'] : 0);
529 break;
530 default:
531 }
532
533 return $result;
534 }
535
536 protected static function getAuxLiveParams(array $params = []): array
537 {
538 $result = [];
539
540 $sourceEntityType = ($params['sourceEntityType'] ?? false);
541 $sourceEntityId = (int)($params['sourceEntityId'] ?? 0);
542 $sourceData = ($params['sourceData'] ?? []);
543 $entityType = ($params['entityType'] ?? false);
544 $entityId = (int)($params['entityId'] ?? 0);
545 $entityData = ($params['entityData'] ?? []);
546 $userPath = ($params['userPath'] ?? '');
547 $logId = (int)($params['logId'] ?? 0);
548
549 if (
550 !$sourceEntityType
551 || $sourceEntityId <= 0
552 || !$entityType
553 || $entityId <= 0
554 || empty($entityData)
555 || !is_array($entityData)
556 )
557 {
558 return $result;
559 }
560
561 $entityProvider = Livefeed\Provider::init([
562 'ENTITY_TYPE' => $sourceEntityType,
563 'ENTITY_ID' => $sourceEntityId,
564 'LOG_ID' => $logId
565 ]);
566
567 $sourceEntityLink = (
568 $params['sourceEntityLink'] ?? self::getSourceEntityUrl([
569 'sourceEntityType' => $sourceEntityType,
570 'sourceEntityId' => $sourceEntityId,
571 'sourceData' => $sourceData,
572 'entityType' => $entityType,
573 'entityData' => $entityData,
574 'userPath' => $userPath,
575 ])
576 );
577
578 $result = [
579 'sourceEntityType' => $sourceEntityType,
580 'sourceEntityId' => $sourceEntityId,
581 'entityType' => $entityType,
582 'entityId' => $entityId,
583 'entityUrl' => static::getEntityUrl([
584 'entityType' => $entityType,
585 'entityData' => $entityData,
586 ]),
587 'entityName' => static::getEntityName([
588 'entityType' => $entityType,
589 'entityData' => $entityData,
590 ]),
591 'sourceEntityLink' => $sourceEntityLink,
592 'suffix' => $entityProvider->getSuffix(),
593 ];
594
595 if ($entityType === CommentAux\CreateEntity::ENTITY_TYPE_TASK)
596 {
597 $result['taskResponsibleId'] = static::getEntityAuthorId([
598 'entityType' => $entityType,
599 'entityData' => $entityData,
600 ]);
601 }
602 elseif (
603 $entityType === CommentAux\CreateEntity::ENTITY_TYPE_BLOG_POST
604 && Loader::includeModule('blog')
605 )
606 {
607 $result['socNetPermissions'] = \CBlogPost::getSocNetPermsCode($entityId);
608 }
609 elseif ($entityType === CommentAux\CreateEntity::ENTITY_TYPE_CALENDAR_EVENT)
610 {
611 $attendees = [];
612 if (!empty($entityData['USER_IDS']) && is_array($entityData['USER_IDS']))
613 {
614 $attendees = $entityData['USER_IDS'];
615 }
616 elseif (!empty($entityData['attendeesEntityList']))
617 {
618 $attendees = array_map(static function($item) {
619 return (int)(isset($item['entityId'], $item['id']) && $item['entityId'] === 'user' ? $item['id'] : 0);
620 }, $entityData['attendeesEntityList']);
621 $attendees = array_filter($attendees, static function($item) {
622 return $item > 0;
623 });
624 }
625
626 if (
627 !empty($entityData['MEETING_HOST'])
628 && (int)$entityData['MEETING_HOST'] > 0
629 )
630 {
631 $attendees[] = (int)($entityData['MEETING_HOST']);
632 }
633 elseif (
634 !empty($entityData['CREATED_BY'])
635 && (int)$entityData['CREATED_BY'] > 0
636 )
637 {
638 $attendees[] = (int)($entityData['CREATED_BY']);
639 }
640
641 $result['attendees'] = array_unique($attendees);
642 }
643
644 return $result;
645 }
646
647 protected static function getEntityUrl(array $params = []): string
648 {
649 $result = '';
650
651 $entityType = ($params['entityType'] ?? false);
652 $entityData = ($params['entityData'] ?? []);
653
654 if (
655 !$entityType
656 || empty($entityData)
657 || !is_array($entityData)
658 )
659 {
660 return $result;
661 }
662
663 switch ($entityType)
664 {
665 case CommentAux\CreateEntity::ENTITY_TYPE_TASK:
666 if (Loader::includeModule('tasks'))
667 {
668 $result = \CTaskNotifications::getNotificationPath(['ID' => $entityData['CREATED_BY']], $entityData['ID'], false);
669 }
670 break;
671 case CommentAux\CreateEntity::ENTITY_TYPE_BLOG_POST:
672 $result = $entityData['URL'];
673 break;
674 case CommentAux\CreateEntity::ENTITY_TYPE_CALENDAR_EVENT:
675 $calendarEventProvider = new Livefeed\CalendarEvent();
676 $calendarEventProvider->setEntityId((int)$entityData['ID']);
677 $calendarEventProvider->initSourceFields();
678 $result = $calendarEventProvider->getLiveFeedUrl();
679 break;
680 default:
681 }
682
683 return $result;
684 }
685
686 protected static function getSourceEntityUrl(array $params = []): string
687 {
688 $sourceEntityType = ($params['sourceEntityType'] ?? false);
689 $sourceEntityId = (int)($params['sourceEntityId'] ?? 0);
690 $sourceData = ($params['sourceData'] ?? []);
691 $userPath = ($params['userPath'] ?? '');
692
693 return (
694 $sourceEntityType === CommentAux\CreateEntity::SOURCE_TYPE_BLOG_COMMENT
695 ? $userPath . 'blog/' . $sourceData['post']['ID']. '/?commentId=' . $sourceEntityId . '#com' . $sourceEntityId
696 : ''
697 );
698 }
699
700 protected static function getEntityName(array $params = []): string
701 {
702 $result = '';
703
704 $entityType = ($params['entityType'] ?? false);
705 $entityData = ($params['entityData'] ?? []);
706
707 if (
708 !$entityType
709 || empty($entityData)
710 || !is_array($entityData)
711 )
712 {
713 return $result;
714 }
715
716 switch ($entityType)
717 {
718 case CommentAux\CreateEntity::ENTITY_TYPE_TASK:
719 $result = htmlspecialcharsback($entityData['TITLE']);
720 break;
721 case CommentAux\CreateEntity::ENTITY_TYPE_BLOG_POST:
722 $result = $entityData['TITLE'];
723 break;
724 case CommentAux\CreateEntity::ENTITY_TYPE_CALENDAR_EVENT:
725 $result = $entityData['NAME'];
726 break;
727 default:
728 }
729
730 return $result;
731 }
732
733 protected static function getSourceData(array $params = []): array
734 {
735 $result = [];
736
737 $sourceEntityType = ($params['sourceEntityType'] ?? false);
738 $sourceEntityId = (int)($params['sourceEntityId'] ?? 0);
739
740 if (
741 in_array($sourceEntityType, [ CommentAux\CreateEntity::SOURCE_TYPE_BLOG_POST, CommentAux\CreateEntity::SOURCE_TYPE_BLOG_COMMENT ], true)
742 && Loader::includeModule('blog'))
743 {
744 $postId = 0;
745
746 if ($sourceEntityType === CommentAux\CreateEntity::SOURCE_TYPE_BLOG_COMMENT)
747 {
748 if ($comment = \CBlogComment::getById($sourceEntityId))
749 {
750 $postId = $comment['POST_ID'];
751 }
752 }
753 elseif ($sourceEntityType === CommentAux\CreateEntity::SOURCE_TYPE_BLOG_POST)
754 {
755 $postId = $sourceEntityId;
756 }
757
758 if (
759 $postId <= 0
760 || !($post = \CBlogPost::getById($postId))
762 'POST' => $post
763 ])
764 )
765 {
766 return $result;
767 }
768
769 $blogId = (int)$post['BLOG_ID'];
770 if ($blogId <= 0)
771 {
772 return $result;
773 }
774
775 $result = [
776 'post' => $post
777 ];
778 }
779
780 return $result;
781 }
782}
static getConnection($name="")
static getList(array $parameters=array())
static addLiveSourceComment(array $params=[])
static addLiveComment($comment=[], $logEntry=[], $commentEvent=[], $params=[])
static processLogEntryCreateEntity(array $params=[])
Definition blogpost.php:13
static canRead($params)
Definition blogpost.php:173
const CONTENT_TYPE_ID
Definition forumpost.php:24