A course search component.
More...
|
| __construct (array $config=array(), $currentcouseid=null) |
| Constructor.
|
|
| get_count () |
| The total number of results.
|
|
| get_results () |
| Returns an array of results from the search.
|
|
| get_search () |
| The current search string.
|
|
moodle_page | get_url () |
| The URL for this search $PAGE.
|
|
| get_varsearch () |
| Returns the name the search variable should use.
|
|
| has_more_results () |
| Returns true if there are more search results.
|
|
| invalidate_results () |
| Invalidates the results collected so far.
|
|
| require_capability ($capability, $user=null) |
| Adds a required capability which all results will be checked against.
|
|
moodle_database | search () |
| Executes the search.
|
|
| set_include_currentcourse () |
| Returns true if the current course should be included in the results.
|
|
| set_url (moodle_url $url) |
| Sets the page URL.
|
|
|
const | DEFAULT_SEARCH = '' |
| The default values for this components params.
|
|
|
static string | $VAR_SEARCH = 'search' |
|
|
int | $currentcourseid = null |
| The current course id.
|
|
bool | $includecurrentcourse |
| Determines if the current course is included in the results.
|
|
A course search component.
- Copyright
- 2010 Sam Hemelryk
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
restore_course_search::__construct |
( |
array | $config = array(), |
|
|
| $currentcouseid = null ) |
Constructor.
- Parameters
-
array | $config | |
int | $currentcouseid | The current course id so it can be ignored |
◆ format_results()
restore_course_search::format_results |
( |
| ) |
|
|
protected |
◆ get_count()
restore_search_base::get_count |
( |
| ) |
|
|
finalinherited |
The total number of results.
- Return values
-
◆ get_itemcontextlevel()
restore_course_search::get_itemcontextlevel |
( |
| ) |
|
|
protected |
Gets the context level for the search result items.
- Return values
-
Reimplemented from restore_search_base.
◆ get_results()
restore_search_base::get_results |
( |
| ) |
|
|
finalinherited |
Returns an array of results from the search.
- Return values
-
◆ get_search()
restore_search_base::get_search |
( |
| ) |
|
|
finalinherited |
The current search string.
- Return values
-
◆ get_searchsql()
◆ get_url()
The URL for this search $PAGE.
- Return values
-
◆ get_varsearch()
restore_course_search::get_varsearch |
( |
| ) |
|
Returns the name the search variable should use.
- Return values
-
Reimplemented from restore_search_base.
◆ has_more_results()
restore_search_base::has_more_results |
( |
| ) |
|
|
finalinherited |
Returns true if there are more search results.
- Return values
-
◆ require_capability()
restore_search_base::require_capability |
( |
| $capability, |
|
|
| $user = null ) |
|
finalinherited |
Adds a required capability which all results will be checked against.
- Parameters
-
string | $capability | |
int | null | $user | |
◆ search()
Executes the search.
$DB
- Return values
-
◆ set_url()
Sets the page URL.
- Parameters
-
◆ setup_restrictions()
restore_course_search::setup_restrictions |
( |
| ) |
|
|
protected |
The documentation for this class was generated from the following file:
- backup/util/ui/restore_ui_components.php