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\AbstractCommentCommentModerationQueueHandler;
9 * An implementation of IModerationQueueActivationHandler for comments.
11 * @author Alexander Ebert
12 * @copyright 2001-2017 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 CommentCommentModerationQueueActivationHandler extends AbstractCommentCommentModerationQueueHandler implements IModerationQueueActivationHandler {
20 protected $definitionName = 'com.woltlab.wcf.moderation.activation';
25 public function enableContent(ModerationQueue $queue) {
26 if ($this->isValid($queue->objectID) && $this->getComment($queue->objectID)->isDisabled) {
27 $commentAction = new CommentAction([$this->getComment($queue->objectID)], 'enable');
28 $commentAction->executeAction();
35 public function getDisabledContent(ViewableModerationQueue $queue) {
36 return $this->getRelatedContent($queue);