Stud.IP  jlu_4.3 Revision 64286
MvvQuickSearch Class Reference
Inheritance diagram for MvvQuickSearch:
Inheritance graph
Collaboration diagram for MvvQuickSearch:
Collaboration graph

Public Member Functions

 __construct ($query, $title='', $avatarLike='')
 
 getResults ($input, $contextual_data=array(), $limit=PHP_INT_MAX, $offset=0)
 
 getAvatarImageTag ($id, $size=Avatar::SMALL, $options=[])
 
 setQsName ($qs_name)
 
- Public Member Functions inherited from SQLSearch
 __construct ($query, $title="", $avatarLike="")
 
 getTitle ()
 
 getAvatar ($id)
 
 getAvatarImageTag ($id, $size=Avatar::SMALL, $options=array())
 
 getResults ($input, $contextual_data=array(), $limit=PHP_INT_MAX, $offset=0)
 
 includePath ()
 
- Public Member Functions inherited from SearchType
 getTitle ()
 
 getAvatar ($id)
 
 getAvatarImageTag ($id)
 
 getResults ($keyword, $contextual_data=array(), $limit=PHP_INT_MAX, $offset=0)
 
 includePath ()
 

Additional Inherited Members

- Static Public Member Functions inherited from SQLSearch
static get ()
 
- Data Fields inherited from SQLSearch
 $extendedLayout = false
 
- Protected Attributes inherited from SQLSearch
 $sql
 
 $avatarLike
 
 $title
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $query,
  $title = '',
  $avatarLike = '' 
)
Parameters
string$querySQL with at least ":input" as parameter
string$title
string$avatarLikein this search. array("input_name" => "placeholder_in_sql_query")
Returns
void

Reimplemented from SQLSearch.

Member Function Documentation

◆ getAvatarImageTag()

getAvatarImageTag (   $id,
  $size = Avatar::SMALL,
  $options = [] 
)

returns an html tag of the image of the searched item (if avatar enabled)

Parameters
string$idid of the item which can be username, user_id, Seminar_id or Institut_id
constant$sizeenum(NORMAL, SMALL, MEDIUM): size of the avatar
Returns
string like "<img src="...avatar.jpg" ... >"

Reimplemented from SQLSearch.

◆ getResults()

getResults (   $input,
  $contextual_data = array(),
  $limit = PHP_INT_MAX,
  $offset = 0 
)

returns the results of a search Use the contextual_data variable to send more variables than just the input to the SQL. QuickSearch for example sends all other variables of the same <form>-tag here.

Parameters
string$inputthe search-word(s)
array$contextual_dataan associative array with more variables
int$limitmaximum number of results (default: all)
int$offsetreturn results starting from this row (default: 0)
Returns
array array(array(), ...)

Reimplemented from SQLSearch.

◆ setQsName()

setQsName (   $qs_name)

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