Stud.IP  5.4
NewsRangesSearch Class Reference
Inheritance diagram for NewsRangesSearch:
SearchType

Public Member Functions

 getTitle ()
 
 getResults ($input, $contextual_data=[], $limit=PHP_INT_MAX, $offset=0)
 
 getAvatar ($id)
 
 getAvatarImageTag ($id, $size=Avatar::SMALL, $options=[])
 
 includePath ()
 
- Public Member Functions inherited from SearchType
 getTitle ()
 
 getAvatar ($id)
 
 getAvatarImageTag ($id)
 
 getResults ($keyword, $contextual_data=[], $limit=PHP_INT_MAX, $offset=0)
 
 __toString ()
 
 includePath ()
 

Protected Member Functions

 getAvatarObject (string $id)
 
 getAdminInstitutes (User $user)
 

Additional Inherited Members

- Data Fields inherited from SearchType
 $extendedLayout = false
 

Member Function Documentation

◆ getAdminInstitutes()

getAdminInstitutes ( User  $user)
protected

Returns a list of all institute ids the given user is admin for.

Parameters
User$user
Returns
string[]

◆ getAvatar()

getAvatar (   $id)

Returns an adress of the avatar of the searched item (if avatar enabled)

Parameters
string$idid of the item which can be username, user_id, Seminar_id or Institut_id
Returns
string url to the avatar image

◆ 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
string$sizeenum(NORMAL, SMALL, MEDIUM): size of the avatar
array$options
Returns
string like "<img src="...avatar.jpg" ... >"

◆ getAvatarObject()

getAvatarObject ( string  $id)
protected

Returns an avatar object for the given combined id.

Parameters
string$id
Returns
Avatar|null

◆ getResults()

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

returns the results of a search

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

◆ getTitle()

getTitle ( )

returns the title/description of the searchfield

Returns
string title/description

◆ includePath()

includePath ( )

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

Returns
string path to this class

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