Stud.IP  2.0 Revision 48548
 All Data Structures Namespaces Files Functions Variables Pages
SearchType Class Reference
Inheritance diagram for SearchType:
Inheritance graph
Collaboration diagram for SearchType:
Collaboration graph

Public Member Functions

 getTitle ()
 getAvatar ($id)
 getAvatarImageTag ($id)
 getResults ($keyword, $contextual_data=array(), $limit=PHP_INT_MAX, $offset=0)
 includePath ()

Detailed Description

A class-structure for alle search-objects in Stud.IP. It is (mainly?) used in QuickSearch to display searchresults and the layout of them.

Author
Rasmus Fuhse

Member Function Documentation

getAvatar (   $id)

Returns an URL to a picture of that type. Return "" for nothing found. For example: "return CourseAvatar::getAvatar($id)->getURL(Avatar::SMALL)".

Parameters
string$id
Returns
: string URL to a picture

Reimplemented in SQLSearch.

getAvatarImageTag (   $id)

Returns an HTML-Tag of a picture of that type. Return "" for nothing found. For example: "return CourseAvatar::getAvatar($id)->getImageTag(Avatar::SMALL)".

Parameters
string$id
Returns
string HTML of a picture
getResults (   $keyword,
  $contextual_data = array(),
  $limit = PHP_INT_MAX,
  $offset = 0 
)

Returns the results to a given keyword. To get the results is the job of this routine and it does not even need to come from a database. The results should be an array in the form array ( array($key, $name), array($key, $name), ... ) where $key is an identifier like user_id and $name is a displayed text that should appear to represent that ID.

Parameters
string$keyword
string$contextual_data
int$limitmaximum number of results (default: all)
int$offsetreturn results starting from this row (default: 0)
Returns
array

Reimplemented in SQLSearch, PermissionSearch, and SeminarSearch.

getTitle ( )

title of the search like "search for courses" or just "courses"

Returns
string

Reimplemented in SQLSearch, StandardSearch, and SeminarSearch.

includePath ( )
abstract

Returns the path to this file, so that this class can be autoloaded and is always available when necessary. Should be: "return <strong>file</strong>;"

Returns
string path to this file

Reimplemented in SQLSearch, PermissionSearch, StandardSearch, and SeminarSearch.


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