CWIS Developer Documentation
Public Member Functions | List of all members
SearchFacetUI Class Reference

SearchFacetUI supports the generation of a user interface for faceted search, by taking the search parameters and search results and generating the data needed to lay out the HTML. More...

Public Member Functions

 __construct ($BaseLink, $SearchParams, $SearchResults, $User, $MaxFacetsPerField, $SchemaId)
 Constructor, that accepts the search parameters and results and prepares the facet UI data to be retrieved. More...
 
 GetSuggestionsByFieldName ()
 Retrieve facet UI data for non-tree metadata fields. More...
 
 GetTreeSuggestionsByFieldName ()
 Retrieve facet UI data for tree metadata fields. More...
 
 GetFieldsOpenByDefault ()
 Retrieve which fields should be initially open in facet UI. More...
 

Detailed Description

SearchFacetUI supports the generation of a user interface for faceted search, by taking the search parameters and search results and generating the data needed to lay out the HTML.

Definition at line 15 of file SearchFacetUI.php.

Constructor & Destructor Documentation

SearchFacetUI::__construct (   $BaseLink,
  $SearchParams,
  $SearchResults,
  $User,
  $MaxFacetsPerField,
  $SchemaId 
)

Constructor, that accepts the search parameters and results and prepares the facet UI data to be retrieved.

Parameters
string$BaseLinkBase URL for search results, without any search parameter values.
object$SearchParamsCurrent search parameter set.
array$SearchResultsSearch result array, with resource IDs for the index and result scores for the values.
object$UserUser (if any) who will be using the interface.
int$MaxFacetsPerFieldMaximum number of
int$SchemaIdID of metadata schema for resources.

Definition at line 32 of file SearchFacetUI.php.

References SPTSearchEngine\GetResultFacets(), MetadataSchema\MDFSTAT_OK, MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_OPTION, and MetadataSchema\MDFTYPE_TREE.

Member Function Documentation

SearchFacetUI::GetFieldsOpenByDefault ( )

Retrieve which fields should be initially open in facet UI.

Returns
array Indexed by field name.

Definition at line 205 of file SearchFacetUI.php.

References MetadataSchema\MDFTYPE_TREE.

SearchFacetUI::GetSuggestionsByFieldName ( )

Retrieve facet UI data for non-tree metadata fields.

Returns
array Facet data.

Definition at line 187 of file SearchFacetUI.php.

SearchFacetUI::GetTreeSuggestionsByFieldName ( )

Retrieve facet UI data for tree metadata fields.

Returns
array Facet data.

Definition at line 196 of file SearchFacetUI.php.


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