public function PublishComment::execute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/comment/src/Plugin/Action/PublishComment.php \Drupal\comment\Plugin\Action\PublishComment::execute()
Executes the plugin.
Overrides ExecutableInterface::execute
File
- core/
modules/ comment/ src/ Plugin/ Action/ PublishComment.php, line 27 - Contains \Drupal\comment\Plugin\Action\PublishComment.
Class
- PublishComment
- Publishes a comment.
Namespace
Drupal\comment\Plugin\ActionCode
public function execute($comment = NULL) {
$comment
->setPublished(TRUE);
$comment
->save();
}