Forum posts search area
Copyright: | 2015 David Monllao {@link http://www.davidmonllao.com} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 322 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
post:: (13 methods):
get_document_recordset()
get_document()
uses_file_indexing()
get_search_fileareas()
attach_files()
check_access()
get_doc_url()
get_context_url()
get_post()
get_forum()
get_discussion()
get_contexts_to_reindex_extra_sql()
supports_group_restriction()
get_document_recordset($modifiedfrom = 0, \context $context = null) X-Ref |
Returns recordset containing required data for indexing forum posts. param: int $modifiedfrom timestamp param: \context|null $context Optional context to restrict scope of returned results return: moodle_recordset|null Recordset (or null if no results) |
get_document($record, $options = array() X-Ref |
Returns the document associated with this post id. param: stdClass $record Post info. param: array $options return: \core_search\document |
uses_file_indexing() X-Ref |
Returns true if this area uses file indexing. return: bool |
get_search_fileareas() X-Ref |
Return the context info required to index files for this search area. return: array |
attach_files($document) X-Ref |
Add the forum post attachments. param: document $document The current document return: null |
check_access($id) X-Ref |
Whether the user can access the document or not. param: int $id Forum post id return: bool |
get_doc_url(\core_search\document $doc) X-Ref |
Link to the forum post discussion param: \core_search\document $doc return: \moodle_url |
get_context_url(\core_search\document $doc) X-Ref |
Link to the forum. param: \core_search\document $doc return: \moodle_url |
get_post($postid) X-Ref |
Returns the specified forum post from its internal cache. param: int $postid return: stdClass |
get_forum($forumid) X-Ref |
Returns the specified forum checking the internal cache. Store minimal information as this might grow. param: int $forumid return: stdClass |
get_discussion($discussionid) X-Ref |
Returns the discussion checking the internal cache. param: int $discussionid return: stdClass |
get_contexts_to_reindex_extra_sql() X-Ref |
Changes the context ordering so that the forums with most recent discussions are indexed first. return: string[] SQL join and ORDER BY |
supports_group_restriction() X-Ref |
Confirms that data entries support group restrictions. return: bool True |