public function Comment::permalink in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::permalink()
Returns the permalink URL for this comment.
Return value
Overrides CommentInterface::permalink
File
- core/
modules/ comment/ src/ Entity/ Comment.php, line 206 - Contains \Drupal\comment\Entity\Comment.
Class
- Comment
- Defines the comment entity class.
Namespace
Drupal\comment\EntityCode
public function permalink() {
$entity = $this
->getCommentedEntity();
$uri = $entity
->urlInfo();
$uri
->setOption('fragment', 'comment-' . $this
->id());
return $uri;
}