Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Search area for mod_book chapters.

Copyright: 2016 Eric Merrill {@link http://www.merrilldigital.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 190 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: chapter  - X-Ref

Search area for mod_book chapters.

get_document_recordset($modifiedfrom = 0, \context $context = null)   X-Ref
Returns a recordset with all required chapter information.

return: moodle_recordset|null Recordset (or null if no results)
param: int $modifiedfrom
param: \context|null $context Optional context to restrict scope of returned results

get_document($record, $options = array()   X-Ref
Returns the document for a particular chapter.

return: \core_search\document
param: \stdClass $record A record containing, at least, the indexed document id and a modified timestamp
param: array     $options Options for document creation

check_access($id)   X-Ref
Can the current user see the document.

return: bool True if the user can see it, false otherwise
param: int $id The internal search area entity id.

get_doc_url(\core_search\document $doc)   X-Ref
Returns a url to the chapter.

return: \moodle_url
param: \core_search\document $doc

get_context_url(\core_search\document $doc)   X-Ref
Returns a url to the book.

return: \moodle_url
param: \core_search\document $doc

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