public Comment::getCommentedEntityId()
Returns the ID of the entity to which the comment is attached.
Return value
int The ID of the entity to which the comment is attached.
Overrides CommentInterface::getCommentedEntityId
File
- core/modules/comment/src/Entity/Comment.php, line 350
Class
- Comment
- Defines the comment entity class.
Namespace
Drupal\comment\Entity
Code
public function getCommentedEntityId() { return $this->get('entity_id')->target_id; }
Please login to continue.