public function Comment::getCommentedEntity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::getCommentedEntity()
Returns the entity to which the comment is attached.
Return value
\Drupal\Core\Entity\FieldableEntityInterface The entity on which the comment is attached.
Overrides CommentInterface::getCommentedEntity
3 calls to Comment::getCommentedEntity()
- Comment::permalink in core/
modules/ comment/ src/ Entity/ Comment.php - Returns the permalink URL for this comment.
- Comment::postSave in core/
modules/ comment/ src/ Entity/ Comment.php - Acts on a saved entity before the insert or update hook is invoked.
- Comment::referencedEntities in core/
modules/ comment/ src/ Entity/ Comment.php - Gets a list of entities referenced by this entity.
File
- core/
modules/ comment/ src/ Entity/ Comment.php, line 364 - Contains \Drupal\comment\Entity\Comment.
Class
- Comment
- Defines the comment entity class.
Namespace
Drupal\comment\EntityCode
public function getCommentedEntity() {
return $this
->get('entity_id')->entity;
}