public function get_doc_url(\core_search\document $doc) {
        $users = $this->get_current_other_users($doc);
        $position = 'm'.$doc->get('itemid');
        return new \moodle_url('/message/index.php', array('history' => MESSAGE_HISTORY_ALL,
                'user1' => $users['currentuserid'], 'user2' => $users['otheruserid']), $position);
    }
public function get_doc_url(\core_search\document $doc) {
        $users = $this->get_current_other_users($doc);
        $position = 'm'.$doc->get('itemid');
        return new \moodle_url('/message/index.php', array('history' => MESSAGE_HISTORY_ALL,
                'user1' => $users['currentuserid'], 'user2' => $users['otheruserid']), $position);
    }
public function get_doc_url ( \ core_search \ document $ doc ) { $ users = $ this -> get_current_other_users ( $ doc ) ; $ position = 'm' . $ doc -> get ( 'itemid' ) ; return new \ moodle_url ( '/message/index.php' , array ( 'history' => MESSAGE_HISTORY_ALL , 'user1' => $ users [ 'currentuserid' ] , 'user2' => $ users [ 'otheruserid' ] ) , $ position ) ; }
Link to the message.

@param \core_search\document $doc
@return \moodle_url
Link to the message .