public function Comment::referencedEntities in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::referencedEntities()
Gets a list of entities referenced by this entity.
Return value
\Drupal\Core\Entity\EntityInterface[] An array of entities.
Overrides ContentEntityBase::referencedEntities
File
- core/
modules/ comment/ src/ Entity/ Comment.php, line 195 - Contains \Drupal\comment\Entity\Comment.
Class
- Comment
- Defines the comment entity class.
Namespace
Drupal\comment\EntityCode
public function referencedEntities() {
$referenced_entities = parent::referencedEntities();
if ($this
->getCommentedEntityId()) {
$referenced_entities[] = $this
->getCommentedEntity();
}
return $referenced_entities;
}