Entity URI callback.
function comment_uri(CommentInterface $comment) { return new Url('entity.comment.canonical', [ 'comment' => $comment->id(), ], [ 'fragment' => 'comment-' . $comment->id(), ]); }