CSOpenSearchRequest
in package
Tags
Table of Contents
- __construct() : mixed
- The constructor of the search request
- activateFullTextSearch() : mixed
- Activates full text search
- getAdditionalFilter() : CSItemSearchFilter
- Fetches the additional filter registered for the given Search Request for given item class
- getAdditionalValue() : mixed|bool
- Gets the setted additional value.
- getAdditionalValues() : array<string|int, mixed>
- Gets all additional values.
- getAllowedRecordClasses() : array<string|int, mixed>
- Fetches the allowed record classes for the given request
- getArea() : string
- Returns the area of the search request
- getCacheKey() : string
- Creates a unique cache key for the request
- getCount() : int
- Gets the requested count of results for a page
- getFormat() : string
- Gets the format of the request (like rss)
- getLanguage() : mixed
- Gets the requested language for the search results
- getLanguageID() : int
- Gets the ID of the requested language
- getLoggedInUserId() : int
- Returns the ID of the original logged-in user
- getOpenKey() : string
- Retrieves the share link
- getPage() : int
- Gets the requested page of the request from 1 to n
- getPaginationHandler() : CSOpenSearchResultPaginationHandler|null
- Returns the pagination handler associated with this request
- getSearch() : string
- Gets the search phrase for the search request
- getSelectModeCacheKey() : string
- Returns a cache key with all important information about SelectMode
- getSelectModeDeselectedIds() : array<string|int, mixed>|null
- Returns only "deselected" ids.
- getSelectModeItems() : array<string|int, mixed>
- Returns an associative array with selected/deselected items.
- getSelectModeSelectedIds() : array<string|int, mixed>|null
- Returns only "selected" ids.
- getService() : CSRestservice
- Returns the service this request is processed with
- getSimpleCacheKey() : string
- Creates a unique cache key for the request a little bit more generous
- getWindowID() : string
- Returns the WindowID of the search request
- isFullTextSearchActive() : bool
- Tests if the full text search is active
- isSelectModeActive() : bool
- Whenever the select mode is active or not.
- isSelectModeAllSelected() : bool
- Whenever the select all button is active or not.
- setAdditionalFilter() : mixed
- Sets additional Search filter for given Search Request
- setAdditionalValue() : void
- Sets additional values which might be helpful be processing this object later on.
- setAllowedRecordClasses() : mixed
- Sets the allowed record classes for the given request
- setArea() : void
- Each search result and item can be assigned a search area
- setCount() : void
- Sets the requested count of results for a page
- setFormat() : void
- Sets the format of the request (like rss)
- setLanguage() : void
- Sets the requested language for the search results
- setOpenKey() : mixed
- Sets a share link
- setPage() : void
- Sets the requested page of the request from 1 to n
- setPaginationHandler() : mixed
- Sets the pagination handler for the request
- setSearch() : void
- Sets the search phrase for the search request
- setSelectModeActive() : void
- Whenever the select mode is active or not.
- setSelectModeAllSelected() : void
- Whenever the select all button is active or not.
- setSelectModeItems() : void
- Sets a associative array of selected/deselected items Like [ [ITEM_CLASS => ['selected' => [IDS], 'deselected' => []], [ITEM_CLASS_2 => ['selected' => [IDS], 'deselected' => []] ]
- setService() : mixed
- Set's the Restservice that handles the request
- setWindowID() : mixed
- Sets the WindowID of the search request
Methods
__construct()
The constructor of the search request
public
__construct(string $search, mixed $language) : mixed
Parameters
- $search : string
-
the search phrase
- $language : mixed
-
the language as ID or short name
Tags
Return values
mixed —activateFullTextSearch()
Activates full text search
public
activateFullTextSearch([bool $bFullTextSearchActive = true ]) : mixed
Parameters
- $bFullTextSearchActive : bool = true
-
TRUE to activate full text search FALSE, Otherwise
Tags
Return values
mixed —getAdditionalFilter()
Fetches the additional filter registered for the given Search Request for given item class
public
getAdditionalFilter(string $sItemClass) : CSItemSearchFilter
Parameters
- $sItemClass : string
-
The class name of the item
Tags
Return values
CSItemSearchFilter —Additional Filter
getAdditionalValue()
Gets the setted additional value.
public
getAdditionalValue(mixed $mKey) : mixed|bool
Parameters
- $mKey : mixed
Tags
Return values
mixed|bool —Returns the desired value for the given key otherwise FALSE.
getAdditionalValues()
Gets all additional values.
public
getAdditionalValues() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getAllowedRecordClasses()
Fetches the allowed record classes for the given request
public
getAllowedRecordClasses() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —List of allowed record classes
getArea()
Returns the area of the search request
public
getArea() : string
Tags
Return values
string —the area
getCacheKey()
Creates a unique cache key for the request
public
getCacheKey() : string
Tags
Return values
string —getCount()
Gets the requested count of results for a page
public
getCount() : int
Tags
Return values
int —the count of results for a page
getFormat()
Gets the format of the request (like rss)
public
getFormat() : string
Tags
Return values
string —the format like rss
getLanguage()
Gets the requested language for the search results
public
getLanguage() : mixed
Tags
Return values
mixed —the language as ID or short name
getLanguageID()
Gets the ID of the requested language
public
getLanguageID() : int
Tags
Return values
int —the language ID
getLoggedInUserId()
Returns the ID of the original logged-in user
public
getLoggedInUserId() : int
Tags
Return values
int —getOpenKey()
Retrieves the share link
public
getOpenKey() : string
Tags
Return values
string —the share link
getPage()
Gets the requested page of the request from 1 to n
public
getPage() : int
Tags
Return values
int —the page index from 1 to n
getPaginationHandler()
Returns the pagination handler associated with this request
public
getPaginationHandler() : CSOpenSearchResultPaginationHandler|null
Tags
Return values
CSOpenSearchResultPaginationHandler|null —getSearch()
Gets the search phrase for the search request
public
getSearch() : string
Tags
Return values
string —the search phrase for the search request
getSelectModeCacheKey()
Returns a cache key with all important information about SelectMode
public
getSelectModeCacheKey() : string
Tags
Return values
string —getSelectModeDeselectedIds()
Returns only "deselected" ids.
public
getSelectModeDeselectedIds([string|null $sClass = null ]) : array<string|int, mixed>|null
Parameters
- $sClass : string|null = null
-
An optional Class for which the deselected IDs should be returned. If not provided the first bucket in the complete array of getSelectModeItems-method
Tags
Return values
array<string|int, mixed>|null —getSelectModeItems()
Returns an associative array with selected/deselected items.
public
getSelectModeItems() : array<string|int, mixed>
Like [ [ITEM_CLASS => ['selected' => [IDS], 'deselected' => []], [ITEM_CLASS_2 => ['selected' => [IDS], 'deselected' => []] ]
To filter for this data, you can use CSOpenSearch::filterForSelectMode method
Tags
Return values
array<string|int, mixed> —getSelectModeSelectedIds()
Returns only "selected" ids.
public
getSelectModeSelectedIds([string|null $sClass = null ]) : array<string|int, mixed>|null
Parameters
- $sClass : string|null = null
-
An optional Class for which the selected IDs should be returned. If not provided the first bucket in the complete array of getSelectModeItems-method
Tags
Return values
array<string|int, mixed>|null —getService()
Returns the service this request is processed with
public
getService() : CSRestservice
Tags
Return values
CSRestservice —the service
getSimpleCacheKey()
Creates a unique cache key for the request a little bit more generous
public
getSimpleCacheKey() : string
Tags
Return values
string —getWindowID()
Returns the WindowID of the search request
public
getWindowID() : string
Tags
Return values
string —the Window ID
isFullTextSearchActive()
Tests if the full text search is active
public
isFullTextSearchActive() : bool
Tags
Return values
bool —TRUE if full text search is active FALSE, Otherwise
isSelectModeActive()
Whenever the select mode is active or not.
public
isSelectModeActive() : bool
Tags
Return values
bool —isSelectModeAllSelected()
Whenever the select all button is active or not.
public
isSelectModeAllSelected() : bool
Tags
Return values
bool —setAdditionalFilter()
Sets additional Search filter for given Search Request
public
setAdditionalFilter(CSItemSearchFilter $oAdditionalSearchFilter, string $sItemClass) : mixed
Parameters
- $oAdditionalSearchFilter : CSItemSearchFilter
-
The Search Filter
- $sItemClass : string
-
The class name of the item
Tags
Return values
mixed —setAdditionalValue()
Sets additional values which might be helpful be processing this object later on.
public
setAdditionalValue(mixed $mKey, mixed $mValue) : void
Parameters
- $mKey : mixed
- $mValue : mixed
Tags
Return values
void —setAllowedRecordClasses()
Sets the allowed record classes for the given request
public
setAllowedRecordClasses(array<string|int, mixed> $aAllowedRecordClasses) : mixed
Parameters
- $aAllowedRecordClasses : array<string|int, mixed>
-
list of allowed record classes
Tags
Return values
mixed —setArea()
Each search result and item can be assigned a search area
public
setArea(string $area) : void
Parameters
- $area : string
-
the area
Tags
Return values
void —setCount()
Sets the requested count of results for a page
public
setCount(int $count) : void
Parameters
- $count : int
-
the count of results for a page
Tags
Return values
void —setFormat()
Sets the format of the request (like rss)
public
setFormat(string $format) : void
Parameters
- $format : string
-
the format like rss
Tags
Return values
void —setLanguage()
Sets the requested language for the search results
public
setLanguage(int|string $language) : void
Parameters
- $language : int|string
-
the language as ID or short name
Tags
Return values
void —setOpenKey()
Sets a share link
public
setOpenKey(string $OpenKey) : mixed
Parameters
- $OpenKey : string
-
the share link
Tags
Return values
mixed —setPage()
Sets the requested page of the request from 1 to n
public
setPage(int $page) : void
Parameters
- $page : int
-
the page index from 1 to n
Tags
Return values
void —setPaginationHandler()
Sets the pagination handler for the request
public
setPaginationHandler(CSOpenSearchResultPaginationHandler $oHandler) : mixed
Parameters
- $oHandler : CSOpenSearchResultPaginationHandler
-
Handler to be set
Tags
Return values
mixed —setSearch()
Sets the search phrase for the search request
public
setSearch(string $search) : void
Parameters
- $search : string
-
the search phrase for the search request
Tags
Return values
void —setSelectModeActive()
Whenever the select mode is active or not.
public
setSelectModeActive([bool $bIsSelectModeActive = true ]) : void
Parameters
- $bIsSelectModeActive : bool = true
Tags
Return values
void —setSelectModeAllSelected()
Whenever the select all button is active or not.
public
setSelectModeAllSelected([bool $bIsAllSelected = true ]) : void
Parameters
- $bIsAllSelected : bool = true
Tags
Return values
void —setSelectModeItems()
Sets a associative array of selected/deselected items Like [ [ITEM_CLASS => ['selected' => [IDS], 'deselected' => []], [ITEM_CLASS_2 => ['selected' => [IDS], 'deselected' => []] ]
public
setSelectModeItems(array<string|int, mixed> $aSelectedItemsData) : void
To filter for this data, you can use CSOpenSearch::filterForSelectMode method
Parameters
- $aSelectedItemsData : array<string|int, mixed>
Tags
Return values
void —setService()
Set's the Restservice that handles the request
public
setService(mixed $service) : mixed
Parameters
- $service : mixed
Tags
Return values
mixed —setWindowID()
Sets the WindowID of the search request
public
setWindowID(string $sWindowID) : mixed
Parameters
- $sWindowID : string
-
the window id of the request
return void
