Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

Search area for course custom fields.

Copyright: Toni Barbera <toni@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 196 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

customfield:: (8 methods):
  get_document_recordset()
  get_document()
  check_access()
  get_doc_url()
  get_context_url()
  get_component_name()
  get_doc_icon()
  get_category_names()


Class: customfield  - X-Ref

Search area for course custom fields.

get_document_recordset($modifiedfrom = 0, \context $context = null)   X-Ref
Returns recordset containing required data for indexing
course custom fields.

param: int $modifiedfrom timestamp
param: \context|null $context Restriction context
return: \moodle_recordset|null Recordset or null if no change possible

get_document($record, $options = array()   X-Ref
Returns the document associated with this section.

param: \stdClass $record
param: array $options
return: \core_search\document|bool

check_access($id)   X-Ref
Whether the user can access the document or not.

param: int $id The course instance id.
return: int

get_doc_url(\core_search\document $doc)   X-Ref
Link to the course.

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

get_context_url(\core_search\document $doc)   X-Ref
Link to the course.

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

get_component_name()   X-Ref
Returns the moodle component name.

It might be the plugin name (whole frankenstyle name) or the core subsystem name.

return: string

get_doc_icon(\core_search\document $doc)   X-Ref
Returns an icon instance for the document.

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

get_category_names()   X-Ref
Returns a list of category names associated with the area.

return: array