Moodle  2.2.1
http://www.collinsharper.com
restore_search_base Class Reference
Inheritance diagram for restore_search_base:
Collaboration diagram for restore_search_base:

Public Member Functions

 __construct (array $config=array())
 get_url ()
 get_search ()
 get_count ()
 get_results ()
 set_url (moodle_url $url)
 invalidate_results ()
 require_capability ($capability, $user=null)
 search ()
 has_more_results ()
 get_varsearch ()

Data Fields

const DEFAULT_SEARCH = ''

Static Public Attributes

static $VAR_SEARCH = 'search'
static $MAXRESULTS = 10

Protected Member Functions

 get_searchsql ()
 get_itemcontextlevel ()
 format_results ()

Detailed Description

A base class that can be used to build a specific search upon

Definition at line 29 of file restore_ui_components.php.


Constructor & Destructor Documentation

__construct ( array config = array())

Constructor

Parameters:
array$configConfig options

Reimplemented in restore_category_search.

Definition at line 73 of file restore_ui_components.php.

Here is the call graph for this function:


Member Function Documentation

format_results ( ) [abstract, protected]

Formats the results

Reimplemented in restore_category_search, and restore_course_search.

get_count ( ) [final]

The total number of results

Returns:
int

Definition at line 107 of file restore_ui_components.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get_itemcontextlevel ( ) [abstract, protected]

Gets the context level associated with this components items

Returns:
CONTEXT_*

Reimplemented in restore_category_search, and restore_course_search.

Here is the caller graph for this function:

get_results ( ) [final]

Returns an array of results from the search

Returns:
array

Definition at line 117 of file restore_ui_components.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get_search ( ) [final]

The current search string

Returns:
string

Definition at line 100 of file restore_ui_components.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get_searchsql ( ) [abstract, protected]

Returns an array containing the SQL for the search and the params

Returns:
array

Reimplemented in restore_category_search, and restore_course_search.

Here is the caller graph for this function:

get_url ( ) [final]

The URL for this search moodle_page $PAGE

Returns:
moodle_url The URL for this page

Definition at line 89 of file restore_ui_components.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get_varsearch ( ) [abstract]

Gets the string used to transfer the search string for this compontents requests

Returns:
string

Reimplemented in restore_category_search, and restore_course_search.

Here is the caller graph for this function:

has_more_results ( ) [final]

Definition at line 188 of file restore_ui_components.php.

Here is the call graph for this function:

Here is the caller graph for this function:

invalidate_results ( ) [final]

Invalidates the results collected so far

Definition at line 133 of file restore_ui_components.php.

require_capability ( capability,
user = null 
) [final]

Adds a required capability which all results will be checked against

Parameters:
string$capability
int | null$user

Definition at line 142 of file restore_ui_components.php.

Here is the caller graph for this function:

search ( ) [final]

Executes the search

moodle_database $DB

Returns:
int The number of results

Definition at line 157 of file restore_ui_components.php.

Here is the call graph for this function:

Here is the caller graph for this function:

set_url ( moodle_url url) [final]

Sets the page URL

Parameters:
moodle_url$url

Definition at line 127 of file restore_ui_components.php.


Field Documentation

$MAXRESULTS = 10 [static]

Definition at line 42 of file restore_ui_components.php.

$VAR_SEARCH = 'search' [static]

Reimplemented in restore_category_search, and restore_course_search.

Definition at line 40 of file restore_ui_components.php.

const DEFAULT_SEARCH = ''

The default values for this components params

Definition at line 34 of file restore_ui_components.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations