Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
core_search\output\renderer Class Reference

Search renderer. More...

Inheritance diagram for core_search\output\renderer:

Public Member Functions

 render_index_requests_info (\stdClass $info)
 Returns information about queued index requests.
 
 render_result (\core_search\document $doc)
 Displaying search results.
 
 render_results ($results, $page, $totalcount, $url, $cat=null)
 Renders search results.
 
 render_search_disabled ()
 Returns a box with a search disabled lang string.
 
 render_top_results ($results)
 Top results content.
 

Public Attributes

int const SEARCH_RESULT_STRING_SIZE = 100
 Max number chars to display of a string value.
 
int const SEARCH_RESULT_TEXT_SIZE = 500
 Max number chars to display of a text value.
 

Detailed Description

Search renderer.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ render_index_requests_info()

core_search\output\renderer::render_index_requests_info ( \stdClass $info)

Returns information about queued index requests.

Parameters
stdClass$infoInfo object from get_index_requests_info
Return values
stringHTML
Exceptions
moodle_exceptionAny error with template

◆ render_result()

core_search\output\renderer::render_result ( \core_search\document $doc)

Displaying search results.

Parameters
core_search\documentContaining a single search response to be displayed.a
Return values
stringHTML

◆ render_results()

core_search\output\renderer::render_results ( $results,
$page,
$totalcount,
$url,
$cat = null )

Renders search results.

Parameters
core_search\document[]$results
int$pageZero based page number.
int$totalcountTotal number of results available.
moodle_url$url
core_search\area_category | null$catSelected search are category or null if category functionality is disabled.
Return values
stringHTML

◆ render_search_disabled()

core_search\output\renderer::render_search_disabled ( )

Returns a box with a search disabled lang string.

Return values
stringHTML

◆ render_top_results()

core_search\output\renderer::render_top_results ( $results)

Top results content.

Parameters
core_search\document[]$resultsSearch Results
Return values
stringcontent of the top result section

The documentation for this class was generated from the following file: