CSOpenSearchResponse
in package
Implements an open search response
Tags
Table of Contents
- __construct() : mixed
- The constructor
- addItem() : CSOpenSearchItem
- Adds a CSOpenSearchItem to the Response
- addNewItem() : CSOpenSearchItem
- Adds an item to the search result by creating it
- addResponse() : void
- Adds and merges the items of another response this response
- areItemsDeletable() : bool
- Retrives status if items can be deleted in the current Search Area or not
- getFoundIDs() : array<string|int, mixed>
- Returns an Array containing all IDs matching the search
- getIDsForDetail() : array<string|int, mixed>
- Returns the ItemIDs the OpenSearchItems shall be generated for
- getItems() : array<string|int, CSOpenSearchItem>
- Retrieves the items found for the request
- getSortable() : bool
- Retrives status if manual sorting is configured for current Search Area or not
- getTotalCount() : int
- Retrieves the number of items found for the request
- isFullTextSearchAvailable() : bool
- Tests if the full text search is available
- removeItem() : void
- Removes the given item from the response matching the Ids
- setFoundIDs() : void
- This method sets the IDs that are found in the current area for the actual search term
- setFullTextSearchAvailable() : mixed
- Sets full text search as available
- setIDsForDetail() : void
- Sets an array of searched IDs for which detailed information shall be loaded.
- setItemsDeletable() : void
- Sets True if items can be deleted in the current Search Area
- setSortable() : void
- Sets True if manual Sorting is configured for Search Area
- setTotalCount() : void
- Sets the total count of available but no necessarily contained search items
Methods
__construct()
The constructor
public
__construct([CSOpenSearchArea $area = NULL ]) : mixed
Parameters
- $area : CSOpenSearchArea = NULL
-
the translated area
Tags
Return values
mixed —addItem()
Adds a CSOpenSearchItem to the Response
public
addItem(CSOpenSearchItem $oItem) : CSOpenSearchItem
Parameters
- $oItem : CSOpenSearchItem
-
The item to be added to the result
Tags
Return values
CSOpenSearchItem —addNewItem()
Adds an item to the search result by creating it
public
addNewItem(string $searchAreaID, string $ID, string $label, string $description[, bool|string $url = false ][, bool|string $thumbURL = false ][, string $sItemClass = null ]) : CSOpenSearchItem
Parameters
- $searchAreaID : string
-
the ID of the area that added this item
- $ID : string
-
the ID of the item
- $label : string
-
the label of the search result
- $description : string
-
the description of the search result
- $url : bool|string = false
-
the URL to open onClick of the search result
- $thumbURL : bool|string = false
-
the url to the thumb of the search result as 256 x 256 px
- $sItemClass : string = null
-
The Item class name of the given ID (like Pdmarticle)
Tags
Return values
CSOpenSearchItem —addResponse()
Adds and merges the items of another response this response
public
addResponse(CSOpenSearchResponse $oResponse) : void
Parameters
- $oResponse : CSOpenSearchResponse
Tags
Return values
void —areItemsDeletable()
Retrives status if items can be deleted in the current Search Area or not
public
areItemsDeletable() : bool
Tags
Return values
bool —TRUE if items can be deleted in current Search area FALSE otherwise
getFoundIDs()
Returns an Array containing all IDs matching the search
public
getFoundIDs() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getIDsForDetail()
Returns the ItemIDs the OpenSearchItems shall be generated for
public
getIDsForDetail() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getItems()
Retrieves the items found for the request
public
getItems() : array<string|int, CSOpenSearchItem>
Tags
Return values
array<string|int, CSOpenSearchItem> —The items delivered by the search areas
getSortable()
Retrives status if manual sorting is configured for current Search Area or not
public
getSortable() : bool
Tags
Return values
bool —if manual Sorting is configured for current Search area or not
getTotalCount()
Retrieves the number of items found for the request
public
getTotalCount() : int
Tags
Return values
int —the number of items delivered by the search areas
isFullTextSearchAvailable()
Tests if the full text search is available
public
isFullTextSearchAvailable() : bool
Tags
Return values
bool —TRUE if full text search is available FALSE, Otherwise
removeItem()
Removes the given item from the response matching the Ids
public
removeItem(CSOpenSearchItem $oSearchItem) : void
Parameters
- $oSearchItem : CSOpenSearchItem
Tags
Return values
void —setFoundIDs()
This method sets the IDs that are found in the current area for the actual search term
public
setFoundIDs(array<string|int, int> $aFoundIDs) : void
Parameters
- $aFoundIDs : array<string|int, int>
Tags
Return values
void —setFullTextSearchAvailable()
Sets full text search as available
public
setFullTextSearchAvailable([bool $bFullTextSearchAvailable = true ]) : mixed
Parameters
- $bFullTextSearchAvailable : bool = true
-
TRUE to mark full text search as available FALSE, Otherwise
Tags
Return values
mixed —setIDsForDetail()
Sets an array of searched IDs for which detailed information shall be loaded.
public
setIDsForDetail(array<string|int, int> $aIDs) : void
Parameters
- $aIDs : array<string|int, int>
-
The IDs of the items that shall be contained in the response
Tags
Return values
void —setItemsDeletable()
Sets True if items can be deleted in the current Search Area
public
setItemsDeletable([bool $bIsItemDeletable = false ]) : void
Parameters
- $bIsItemDeletable : bool = false
-
TRUE if items can be deleted from the share, FALSE otherwise
Tags
Return values
void —setSortable()
Sets True if manual Sorting is configured for Search Area
public
setSortable([bool $bSortable = false ]) : void
Parameters
- $bSortable : bool = false
Tags
Return values
void —setTotalCount()
Sets the total count of available but no necessarily contained search items
public
setTotalCount(int $totalCount) : void
Parameters
- $totalCount : int
