18 $eventManager = \Bitrix\Main\EventManager::getInstance();
20 \Bitrix\Replica\Client\HandlersManager::register(
new ForumMessageAttachmentHandler);
22 self::$topicHandler =
new TopicHandler;
23 \Bitrix\Replica\Client\HandlersManager::register(self::$topicHandler);
24 $eventManager->addEventHandler(
"forum",
"onAfterTopicAdd", array(self::$topicHandler,
"onAfterTopicAdd"));
25 $eventManager->addEventHandler(
"forum",
"onAfterTopicUpdate", array(self::$topicHandler,
"onAfterTopicUpdate"));
26 $eventManager->addEventHandler(
"forum",
"onAfterTopicDelete", array(self::$topicHandler,
"onAfterTopicDelete"));
28 self::$messageHandler =
new MessageHandler;
29 \Bitrix\Replica\Client\HandlersManager::register(self::$messageHandler);
30 $eventManager->addEventHandler(
"forum",
"onBeforeMessageAdd", array(self::$messageHandler,
"onBeforeMessageAdd"));
31 $eventManager->addEventHandler(
"forum",
"onAfterMessageAdd", array(self::$messageHandler,
"onAfterMessageAdd"));
32 $eventManager->addEventHandler(
"forum",
"onBeforeMessageUpdate", array(self::$messageHandler,
"onBeforeMessageUpdate"));
33 $eventManager->addEventHandler(
"forum",
"onAfterMessageUpdate", array(self::$messageHandler,
"onAfterMessageUpdate"));
34 $eventManager->addEventHandler(
"forum",
"onBeforeMessageDelete", array(self::$messageHandler,
"onBeforeMessageDelete"));
35 $eventManager->addEventHandler(
"forum",
"onAfterMessageDelete", array(self::$messageHandler,
"onAfterMessageDelete"));
37 \Bitrix\Replica\Client\HandlersManager::register(
new MessageRatingVoteHandler);