Stud.IP  5.4
ResourceSearch Class Reference
Inheritance diagram for ResourceSearch:
SearchType RoomSearch

Public Member Functions

 setAcceptedPermissionLevels ($levels=[])
 
 getAcceptedPermissionLevels ()
 
 setUseOfGlobalPermissions ($use_global_permissions=true)
 
 getUseOfGlobalPermissions ()
 
 setAdditionalDisplayProperties ($properties=[])
 
 getAdditionalDisplayProperties ()
 
 setAdditionalPropertyFormat ($format='[%s]')
 
 getAdditionalPropertyFormat ()
 
 setSearchableResourceClasses ($classes=[])
 
 getSearchableResourceClasses ()
 
 getTitle ()
 
 getResults ( $keyword, $contextual_data=[], $limit=PHP_INT_MAX, $offset=0)
 
 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 Attributes

 $accepted_permission_levels = ['user', 'autor', 'tutor', 'admin']
 
 $use_global_permissions = true
 
 $additional_display_properties = []
 
 $additional_property_format = '[%s]'
 
 $searchable_resource_classes = []
 

Additional Inherited Members

- Data Fields inherited from SearchType
 $extendedLayout = false
 

Member Function Documentation

◆ getAcceptedPermissionLevels()

getAcceptedPermissionLevels ( )

The getter method for the $accepted_permission_levels attribute.

Returns
string[]

◆ getAdditionalDisplayProperties()

getAdditionalDisplayProperties ( )

The getter method for the $additional_display_properties attribute.

Returns
array
See also
$additional_display_properties for the array format.

◆ getAdditionalPropertyFormat()

getAdditionalPropertyFormat ( )

The getter method for the $additional_property_format attribute.

Returns
string

◆ getResults()

getResults (   $keyword,
  $contextual_data = [],
  $limit = PHP_INT_MAX,
  $offset = 0 
)
Parameters
string$keywordThe name of the resource or a part of it.
array$contextual_dataThis parameter is not used at the moment.

◆ getSearchableResourceClasses()

getSearchableResourceClasses ( )

The getter method for the $searchable_resource_classes attribute.

Returns
array

◆ getTitle()

getTitle ( )

◆ getUseOfGlobalPermissions()

getUseOfGlobalPermissions ( )

The getter method for the $use_global_permission attribute.

Returns
bool

◆ includePath()

includePath ( )

◆ setAcceptedPermissionLevels()

setAcceptedPermissionLevels (   $levels = [])

The setter method for the $accepted_permission_levels attribute.

Parameters
string[]$accepted_permission_levels The new value for the attribute.

◆ setAdditionalDisplayProperties()

setAdditionalDisplayProperties (   $properties = [])

The setter method for the $additional_display_properties attribute.

Parameters
array$propertiesThe new value for the attribute.

◆ setAdditionalPropertyFormat()

setAdditionalPropertyFormat (   $format = '[%s]')

The setter method for the $additional_property_format attribute.

Parameters
string$formatThe new value for the attribute.

◆ setSearchableResourceClasses()

setSearchableResourceClasses (   $classes = [])

The setter method for the $searchable_resource_classes attribute.

Parameters
array$categoriesThe new value for the attribute.

◆ setUseOfGlobalPermissions()

setUseOfGlobalPermissions (   $use_global_permissions = true)

The setter method for the $use_global_permission attribute.

Parameters
bool$use_global_permissionsThe new value for the attribute.

Field Documentation

◆ $accepted_permission_levels

$accepted_permission_levels = ['user', 'autor', 'tutor', 'admin']
protected

string[] Limits the search results to resources where a person has at least the permission levels specified in this attribute. Defaults to ['user', 'autor', 'tutor', 'admin'].

◆ $additional_display_properties

$additional_display_properties = []
protected

string[] Additional properties that shall be appended to the name of the resource. The array must be one-dimensional.

◆ $additional_property_format

$additional_property_format = '[%s]'
protected

string A format specification for additional properties in the "sprintf syntax". This format specification must have only one placeholder named 's' in which the additional properties will be inserted, separated by the string ", ". This attribute defaults to '[s]'.

◆ $searchable_resource_classes

$searchable_resource_classes = []
protected

array Array of class_names of Resource classes that will be included in the search. An empty array will include all resource classes.

◆ $use_global_permissions

$use_global_permissions = true
protected

bool Whether to use global permissions when searching for resources where a person has permissions on (true) or not. Defaults to true.


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