Stud.IP  jlu_4.1 Revision
GlobalSearchModule Class Reference
Inheritance diagram for GlobalSearchModule:
Inheritance graph
Collaboration diagram for GlobalSearchModule:
Collaboration graph

Static Public Member Functions

static getName ()
 
static getSQL ($search)
 
static filter ($data, $search)
 
static getSearchURL ($searchterm)
 
static mark ($string, $query, $longtext=false, $filename=true)
 

Member Function Documentation

◆ filter()

static filter (   $data,
  $search 
)
staticabstract

Returns an array of information for the found element. Following informations (key: description) are necessary

  • name: The name of the object
  • url: The url to send the user to when he clicks the link

Additional informations are:

  • additional: Subtitle for the hit
  • expand: Url if the user further expands the search
  • img: Avatar for the
Parameters
$dataOne row returned from getSQL SQL Query
$searchThe searchstring (Use for markup e.g. self::mark)
Returns
mixed Information Array

Reimplemented in GlobalSearchMyCourses, GlobalSearchCourses, GlobalSearchForum, GlobalSearchUsers, GlobalSearchFiles, GlobalSearchInstitutes, GlobalSearchMessages, GlobalSearchModules, GlobalSearchResources, GlobalSearchRoomAssignments, and GlobalSearchCalendar.

◆ getName()

◆ getSearchURL()

static getSearchURL (   $searchterm)
static

Returns the URL that can be called for a full search.

This could become obsolete when we have a real global search page. Overwrite this method in your subclass to provide the category specific search page.

Parameters
string$searchtermwhat to search for?

Reimplemented in GlobalSearchCalendar, GlobalSearchCourses, GlobalSearchInstitutes, GlobalSearchMessages, GlobalSearchModules, GlobalSearchMyCourses, GlobalSearchResources, and GlobalSearchUsers.

◆ getSQL()

static getSQL (   $search)
staticabstract

Has to return a SQL Query that discovers all objects. All retrieved data is passed row by row to getGlobalSearchFilter

Parameters
$searchthe input query string
Returns
String SQL Query to discover elements for the search

Reimplemented in GlobalSearchCalendar, GlobalSearchCourses, GlobalSearchFiles, GlobalSearchForum, GlobalSearchInstitutes, GlobalSearchMessages, GlobalSearchModules, GlobalSearchMyCourses, GlobalSearchResources, GlobalSearchRoomAssignments, and GlobalSearchUsers.

◆ mark()

static mark (   $string,
  $query,
  $longtext = false,
  $filename = true 
)
static

Function to mark a querystring in a resultstring

Parameters
$string
$query
bool | true$filename
Returns
mixed
Here is the call graph for this function:
Here is the caller graph for this function:

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