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