2 namespace wcf\system\moderation\queue\activation;
3 use wcf\data\comment\CommentAction;
4 use wcf\data\moderation\queue\ModerationQueue;
5 use wcf\data\moderation\queue\ViewableModerationQueue;
6 use wcf\system\moderation\queue\AbstractCommentResponseModerationQueueHandler;
9 * An implementation of IModerationQueueReportHandler for comment responses.
11 * @author Alexander Ebert
12 * @copyright 2001-2018 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 * @package WoltLabSuite\Core\System\Moderation\Queue
16 class CommentResponseModerationQueueActivationHandler extends AbstractCommentResponseModerationQueueHandler implements IModerationQueueActivationHandler {
20 public function enableContent(ModerationQueue $queue) {
21 if ($this->isValid($queue->objectID) && $this->getResponse($queue->objectID)->isDisabled) {
22 $response = $this->getResponse($queue->objectID);
24 $commentAction = new CommentAction([$this->getComment($response->commentID)], 'enableResponse', [
25 'responses' => [$response]
27 $commentAction->executeAction();
34 public function getDisabledContent(ViewableModerationQueue $queue) {
35 return $this->getRelatedContent($queue);