public function onUpdateInfo(OW_Event $event) { $params = $event->getParams(); $data = $event->getData(); if ($params["entityType"] != self::ENTITY_TYPE) { return; } foreach ($data as $entityId => $info) { $statusActive = $info["status"] == BOL_ContentService::STATUS_ACTIVE; $status = $statusActive ? "approved" : "approval"; // Set tags status BOL_TagService::getInstance()->setEntityStatus(VIDEO_BOL_ClipService::TAGS_ENTITY_TYPE, $entityId, $statusActive); // Set rates status BOL_RateService::getInstance()->setEntityStatus(VIDEO_BOL_ClipService::RATES_ENTITY_TYPE, $entityId, $statusActive); $entityDto = $this->service->findClipById($entityId); $entityDto->status = $status; $this->service->saveClip($entityDto); } }