public function get_discussion_subscribe_url(discussion_entity $discussion) : moodle_url {
        return new moodle_url('/mod/forum/subscribe.php', [
            'sesskey' => sesskey(),
            'id' => $discussion->get_forum_id(),
            'd' => $discussion->get_id()
        ]);
    }
public function get_discussion_subscribe_url(discussion_entity $discussion) : moodle_url {
        return new moodle_url('/mod/forum/subscribe.php', [
            'sesskey' => sesskey(),
            'id' => $discussion->get_forum_id(),
            'd' => $discussion->get_id()
        ]);
    }
public function get_discussion_subscribe_url ( discussion_entity $ discussion ) : moodle_url { return new moodle_url ( '/mod/forum/subscribe.php' , [ 'sesskey' => sesskey ( ) , 'id' => $ discussion -> get_forum_id ( ) , 'd' => $ discussion -> get_id ( ) ] ) ; }
Get the url to subscribe to a discussion.

@param discussion_entity $discussion The discussion
@return moodle_url
Get the url to subscribe to a discussion .