/** * @see \wcf\system\event\IEventListener::execute() */ public function execute($eventObj, $className, $eventName) { $this->eventObj = $eventObj; if (method_exists($this, $this->eventObj->getActionName())) { call_user_func(array($this, $this->eventObj->getActionName())); } }
/** * @see \wcf\system\moderation\queue\IModerationQueueHandler::removeContent() */ public function removeContent(ModerationQueue $queue, $message) { if ($this->isValid($queue->objectID)) { $commentAction = new CommentAction(array($this->getComment($queue->objectID)), 'delete'); $commentAction->executeAction(); } }
/** * Removes a comment or response. * * @return array */ public function remove() { if ($this->comment !== null) { $objectAction = new CommentAction(array($this->comment), 'delete'); $objectAction->executeAction(); return array('commentID' => $this->comment->commentID); } else { $objectAction = new CommentResponseAction(array($this->response), 'delete'); $objectAction->executeAction(); return array('responseID' => $this->response->responseID); } }