Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 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 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

Search renderer.

Copyright: 2015 David Monllao {@link http://www.davidmonllao.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 136 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

renderer:: (4 methods):
  render_results()
  render_result()
  render_search_disabled()
  render_index_requests_info()


Class: renderer  - X-Ref

Search renderer.

render_results($results, $page, $totalcount, $url, $cat = null)   X-Ref
Renders search results.

param: \core_search\document[] $results
param: int $page Zero based page number.
param: int $totalcount Total number of results available.
param: \moodle_url $url
param: \core_search\area_category|null $cat Selected search are category or null if category functionality is disabled.
return: string HTML

render_result(\core_search\document $doc)   X-Ref
Displaying search results.

param: \core_search\document Containing a single search response to be displayed.a
return: string HTML

render_search_disabled()   X-Ref
Returns a box with a search disabled lang string.

return: string HTML

render_index_requests_info(\stdClass $info)   X-Ref
Returns information about queued index requests.

param: \stdClass $info Info object from get_index_requests_info
return: string HTML