Ejemplo n.º 1
0
 public function onQuestionRemove(OW_Event $e)
 {
     $params = $e->getParams();
     $questionId = (int) $params['id'];
     $posts = $this->service->findFullCommentList(EQUESTIONS_BOL_Service::ENTITY_TYPE, $questionId);
     foreach ($posts as $post) {
         $event = new OW_Event(EQUESTIONS_BOL_Service::EVENT_POST_REMOVED, array('questionId' => $questionId, 'id' => $post->id, 'userId' => $post->userId));
         OW::getEventManager()->trigger($event);
     }
     $this->service->deleteEntityComments(EQUESTIONS_BOL_Service::ENTITY_TYPE, $questionId);
 }
Ejemplo n.º 2
0
 public function onCoverRemove(OW_Event $e)
 {
     $params = $e->getParams();
     $this->service->deleteEntityComments(self::ENTITY_TYPE, $params['id']);
 }