Comment::getStatus

public Comment::getStatus()

Returns the comment's status.

Return value

int One of CommentInterface::PUBLISHED or CommentInterface::NOT_PUBLISHED

Overrides CommentInterface::getStatus

File

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

Class

Comment
Defines the comment entity class.

Namespace

Drupal\comment\Entity

Code

public function getStatus() {
  return $this->get('status')->value;
}
doc_Drupal
2016-10-29 08:50:21
Comments
Leave a Comment

Please login to continue.