CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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 | $BaseLink | Base URL for search results, without any search parameter values.
  object | $SearchParams | Current search parameter set.
  array | $SearchResults | Search result array, with resource IDs for the index and result scores for the values.
  object | $User | User (if any) who will be using the interface.
  int | $MaxFacetsPerField | Maximum number of
  int | $SchemaId | ID 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 220 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 202 of file SearchFacetUI.php.

SearchFacetUI::GetTreeSuggestionsByFieldName | ( |  | ) |

Retrieve facet UI data for tree metadata fields.

Returns
  array Facet data.

Definition at line 211 of file SearchFacetUI.php.

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

- interface/default/objects/SearchFacetUI.php