function Comment::getTypeId

Same name and namespace in other branches
  1. 8.9.x core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::getTypeId()
  2. 10 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::getTypeId()
  3. 11.x core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::getTypeId()

Get the comment type ID for this comment.

Return value

string The ID of the comment type.

Overrides CommentInterface::getTypeId

File

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

Class

Comment
Defines the comment entity class.

Namespace

Drupal\comment\Entity

Code

public function getTypeId() {
    return $this->bundle();
}

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