Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CommentInterface.php

function CommentInterface::getCommentedEntity

Returns the entity to which the comment is attached.

Return value

\Drupal\Core\Entity\FieldableEntityInterface|null The entity on which the comment is attached or NULL if the comment is an orphan.

1 method overrides CommentInterface::getCommentedEntity()
Comment::getCommentedEntity in core/modules/comment/src/Entity/Comment.php
Returns the entity to which the comment is attached.

File

core/modules/comment/src/CommentInterface.php, line 63

Class

CommentInterface
Provides an interface defining a comment entity.

Namespace

Drupal\comment

Code

public function getCommentedEntity();

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal