function comment_uri in Drupal 10
Same name and namespace in other branches
- 8 core/modules/comment/comment.module \comment_uri()
- 7 modules/comment/comment.module \comment_uri()
- 9 core/modules/comment/comment.module \comment_uri()
Entity URI callback.
File
- core/
modules/ comment/ comment.module, line 74 - Enables users to comment on published content.
Code
function comment_uri(CommentInterface $comment) {
return new Url('entity.comment.canonical', [
'comment' => $comment
->id(),
], [
'fragment' => 'comment-' . $comment
->id(),
]);
}