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\AbstractCommentCommentModerationQueueHandler;
10 * An implementation of IModerationQueueActivationHandler for comments.
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 CommentCommentModerationQueueActivationHandler extends AbstractCommentCommentModerationQueueHandler implements IModerationQueueActivationHandler {
21 protected $definitionName = 'com.woltlab.wcf.moderation.activation';
26 public function enableContent(ModerationQueue $queue) {
27 if ($this->isValid($queue->objectID) && $this->getComment($queue->objectID)->isDisabled) {
28 $commentAction = new CommentAction([$this->getComment($queue->objectID)], 'enable');
29 $commentAction->executeAction();
36 public function getDisabledContent(ViewableModerationQueue $queue) {
37 return $this->getRelatedContent($queue);