public function onUpdateInfo(OW_Event $event) { $params = $event->getParams(); $data = $event->getData(); if ($params["entityType"] != self::ENTITY_TYPE) { return; } foreach ($data as $topicId => $info) { $status = $info['status'] == BOL_ContentService::STATUS_APPROVAL ? FORUM_BOL_ForumService::STATUS_APPROVAL : FORUM_BOL_ForumService::STATUS_APPROVED; $topicDto = $this->service->findTopicById($topicId); $topicDto->status = $status; $this->service->saveOrUpdateTopic($topicDto); } }