public function get_doc_url(\core_search\document $doc) {
        // The post is already in static cache, we fetch it in self::search_access.
        $post = $this->get_post($doc->get('itemid'));
        return new \moodle_url('/mod/forum/discuss.php', array('d' => $post->discussion));
    }
public function get_doc_url(\core_search\document $doc) {
        // The post is already in static cache, we fetch it in self::search_access.
        $post = $this->get_post($doc->get('itemid'));
        return new \moodle_url('/mod/forum/discuss.php', array('d' => $post->discussion));
    }
public function get_doc_url ( \ core_search \ document $ doc ) { // The post is already in static cache, we fetch it in self::search_access. $ post = $ this -> get_post ( $ doc -> get ( 'itemid' ) ) ; return new \ moodle_url ( '/mod/forum/discuss.php' , array ( 'd' => $ post -> discussion ) ) ; }
Link to the forum post discussion

@param \core_search\document $doc
@return \moodle_url
Link to the forum post discussion