Stud.IP  5.4
Filter Class Reference

Public Member Functions

 isFiltering ()
 
 getCategory ()
 
 setCategory ($category)
 
 hasCategory ()
 
 getSemester ()
 
 setSemester (\Semester $semester=null)
 
 hasSemester ()
 
 validate ()
 
 toArray ()
 

Static Public Member Functions

static getCategories ()
 

Protected Attributes

 $category
 
 $semester
 

Detailed Description

Simple class to hold everything about files search's filtering.

GPL2 or any later version

Since
Stud.IP 4.1

Member Function Documentation

◆ getCategories()

static getCategories ( )
static

Returns all filter categories.

Returns
array an associative array containing id => label pairs

◆ getCategory()

getCategory ( )

Return the active filter category.

Returns
string the active filter category

◆ getSemester()

getSemester ( )

Return the active filter semester.

Returns
Semester the active filter semester

◆ hasCategory()

hasCategory ( )

Is a an active filter category set?

Returns
bool true if there is an active filter category; false otherwise

◆ hasSemester()

hasSemester ( )

Is a an active filter semester set?

Returns
bool true if there is an active filter semester; false otherwise

◆ isFiltering()

isFiltering ( )

Is this filter really filtering?

Returns
bool true if filtering, false otherwise

◆ setCategory()

setCategory (   $category)

Set the active filter category.

Parameters
string$categorythe active filter category
Returns
Filter return $this for chaining

◆ setSemester()

setSemester ( \Semester  $semester = null)

Set the active filter semester.

Parameters
Semester$semesterthe active filter semester
Returns
Filter return $this for chaining

◆ toArray()

toArray ( )

Returns a representation of this filter as an array.

Returns
array the representation of this filter

◆ validate()

validate ( )

Validate the filter.

Returns
bool true if this filter is valid, false otherwise

Field Documentation

◆ $category

$category
protected

◆ $semester

$semester
protected

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