示例#1
0
 /**
  * {@inheritdoc}
  * @param $node \Drupal\node\NodeInterface
  */
 public function execute($node = NULL)
 {
     if (empty($node)) {
         return;
     }
     FeedbackManager::sendFeedback('node', $node->id(), 'spam', 'moderate', 'mollom_action_unpublish_node');
     $node->setPublished(FALSE);
     $node->save();
 }
 /**
  * {@inheritdoc}
  * @param $comment \Drupal\comment\CommentInterface
  */
 public function execute($comment = NULL)
 {
     if (empty($comment)) {
         return;
     }
     FeedbackManager::sendFeedback('comment', $comment->id(), 'spam', 'moderate', 'mollom_action_unpublish_comment');
     $comment->setPublished(FALSE);
     $comment->save();
 }