public Comment::hasParentComment()
Determines if this comment is a reply to another comment.
Return value
bool TRUE if the comment has a parent comment otherwise FALSE.
Overrides CommentInterface::hasParentComment
File
- core/modules/comment/src/Entity/Comment.php, line 329
Class
- Comment
- Defines the comment entity class.
Namespace
Drupal\comment\Entity
Code
public function hasParentComment() { return (bool) $this->get('pid')->target_id; }
Please login to continue.