Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
GlobalSearchForum Class Reference
Inheritance diagram for GlobalSearchForum:
GlobalSearchModule GlobalSearchFulltext

Static Public Member Functions

static getName ()
 
static getFilters ()
 
static getSQL ($search, $filter, $limit)
 
static filter ($data, $search)
 
static blockquote_filter ($content)
 
static direct_search ($string, $query)
 
static enable ()
 
static disable ()
 
static getSearchURL ($searchterm)
 
- Static Public Member Functions inherited from GlobalSearchModule
static getName ()
 
static getSQL ($search, $filter, $limit)
 
static filter ($data, $search)
 
static getFilters ()
 
static getSearchURL ($searchterm)
 
static mark ($string, $query, $longtext=false, $filename=false)
 
static getInstituteIdsForSQL ($institute_id)
 
static getSeminarTypesForSQL ($sem_class)
 
static getActiveSearchModules ()
 

Member Function Documentation

static blockquote_filter (   $content)
static

Looks for blockquote and removes it from content in recursive mode

Parameters
string$contentdata content
Returns
string purified content (without blockquote)
static direct_search (   $string,
  $query 
)
static

Search the query directly inside the string

Parameters
string$stringtext to be searched
string$queryquery to be found
Returns
boolean $found in case of finding true, otherwise false
static disable ( )
static

Disables fulltext (MATCH AGAINST) search by removing the corresponding indices.

Implements GlobalSearchFulltext.

static enable ( )
static

Enables fulltext (MATCH AGAINST) search by creating the corresponding indices.

Implements GlobalSearchFulltext.

static filter (   $data,
  $search 
)
static

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
array$data
string$search
Returns
array
static getFilters ( )
static

Returns the filters that are displayed in the sidebar of the global search.

Returns
array Filters for this class.
static getName ( )
static

Returns the displayname for this module

Returns
string
static getSearchURL (   $searchterm)
static

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

Parameters
string$searchtermwhat to search for?
Returns
string URL to the full search, containing the searchterm and the category
static getSQL (   $search,
  $filter,
  $limit 
)
static

Transforms the search request into an sql statement, that provides the id (same as getId) as type and the object id, that is later passed to the filter.

This function is required to make use of the mysql union parallelism

Parameters
string$searchthe input query string
array$filteran array with search limiting filter information (e.g. 'category', 'semester', etc.)
Returns
String SQL Query to discover elements for the search

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