public function onUpdateInfo(OW_Event $event) { $params = $event->getParams(); $data = $event->getData(); if ($params["entityType"] != self::ENTITY_TYPE) { return; } foreach ($data as $postId => $info) { $status = $info["status"] == BOL_ContentService::STATUS_APPROVAL ? PostService::POST_STATUS_APPROVAL : PostService::POST_STATUS_PUBLISHED; $entityDto = $this->service->findById($postId); $entityDto->isDraft = $status; $this->service->save($entityDto); // Set tags status $tagActive = $info["status"] == BOL_ContentService::STATUS_APPROVAL ? false : true; BOL_TagService::getInstance()->setEntityStatus(self::ENTITY_TYPE, $postId, $tagActive); } }