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

Public Member Functions

 __construct ($search, $title="", $avatarLike="user_id", $presets=array())
 getResults ($input, $contextual_data=array(), $limit=PHP_INT_MAX, $offset=0)
 includePath ()
- Public Member Functions inherited from SQLSearch
 __construct ($query, $title="", $avatarLike="")
 getTitle ()
 getAvatar ($id)
 getAvatarImageTag ($id, $size=Avatar::SMALL)
- Public Member Functions inherited from SearchType
 getAvatarImageTag ($id)

Static Public Member Functions

static get ($search, $title="", $avatarLike="", $presets=array())
- Static Public Member Functions inherited from SQLSearch
static get ($query, $title="", $avatarLike="")

Additional Inherited Members

- Protected Attributes inherited from SQLSearch
 $sql
 $avatarLike
 $title

Detailed Description

Class of type SearchType used for searches with QuickSearch (lib/classes/QuickSearch.class.php). You can search for people with a given Stud.IP permission level, either globally or at an institute.

Author
Thomas Hackl

Constructor & Destructor Documentation

__construct (   $search,
  $title = "",
  $avatarLike = "user_id",
  $presets = array() 
)
Parameters
string$query,:SQL with at least ":input" as parameter
array$presets,:variables from the same form that should be used in this search. array("input_name" => "placeholder_in_sql_query")
Returns
void

Here is the call graph for this function:

Member Function Documentation

static get (   $search,
  $title = "",
  $avatarLike = "",
  $presets = array() 
)
static

returns an object of type SQLSearch with parameters to constructor

Here is the caller graph for this function:

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
inputstring: the search-word(s)
contextual_dataarray: an associative array with more variables
limitint: maximum number of results (default: all)
offsetint: return results starting from this row (default: 0)
Returns
array: array(array(), ...)

Reimplemented from SQLSearch.

Here is the call graph for this function:

includePath ( )

A very simple overwrite of the same method from SearchType class. returns the absolute path to this class for autoincluding this class.

Returns
: path to this class

Reimplemented from SQLSearch.


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