private function get_message(post_entity $post) : string {
        global $CFG;

        $message = $post->get_message();

        if (!empty($CFG->enableplagiarism)) {
            require_once($CFG->libdir . '/plagiarismlib.php');
            $forum = $this->related['forum'];
            $message .= plagiarism_get_links([
                'userid' => $post->get_author_id(),
                'content' => $message,
                'cmid' => $forum->get_course_module_record()->id,
                'course' => $forum->get_course_id(),
                'forum' => $forum->get_id()
            ]);
        }

        return $message;
    }
private function get_message(post_entity $post) : string {
        global $CFG;

        $message = $post->get_message();

        if (!empty($CFG->enableplagiarism)) {
            require_once($CFG->libdir . '/plagiarismlib.php');
            $forum = $this->related['forum'];
            $message .= plagiarism_get_links([
                'userid' => $post->get_author_id(),
                'content' => $message,
                'cmid' => $forum->get_course_module_record()->id,
                'course' => $forum->get_course_id(),
                'forum' => $forum->get_id()
            ]);
        }

        return $message;
    }
private function get_message ( post_entity $ post ) : string { global $ CFG ; $ message = $ post -> get_message ( ) ; if ( ! empty ( $ CFG -> enableplagiarism ) ) { require_once ( $ CFG -> libdir . '/plagiarismlib.php' ) ; $ forum = $ this -> related [ 'forum' ] ; $ message .= plagiarism_get_links ( [ 'userid' => $ post -> get_author_id ( ) , 'content' => $ message , 'cmid' => $ forum -> get_course_module_record ( ) -> id , 'course' => $ forum -> get_course_id ( ) , 'forum' => $ forum -> get_id ( ) ] ) ; } return $ message ; }
Get the message text from a post.

@param post_entity $post The post
@return string
Get the message text from a post .