function Comment::getStatus

Overrides CommentInterface::getStatus

File

core/modules/comment/src/Entity/Comment.php, line 486

Class

Comment
Defines the comment entity class.

Namespace

Drupal\comment\Entity

Code

public function getStatus() {
    @trigger_error(__NAMESPACE__ . '\\Comment::getStatus() is deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \\Drupal\\Core\\Entity\\EntityPublishedInterface::isPublished() instead. See https://www.drupal.org/node/2830201', E_USER_DEPRECATED);
    return $this->get('status')->value;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.