CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

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

Static Public Member Functions | List of all members
QuickSearchHelper Class Reference

Convenience class for QuickSearch responses, making it easy to share functions common to different types of QuickSearch objects. More...

## Static Public Member Functions
static | SearchField (MetadataField $Field, $SearchString, array $IdExclusions=array(), array $ValueExclusions=array())
| Search a field for values matching a specified search string. More...
static | HighlightSearchString ($SearchTerms, $LabelForFormatting)
| Highlight all instances of the search string in the result label. More...

## Detailed Description

Convenience class for QuickSearch responses, making it easy to share functions common to different types of QuickSearch objects.

Definition at line 14 of file QuickSearchHelper.php.

## Member Function Documentation

static QuickSearchHelper::HighlightSearchString | ( |  | $SearchTerms,
|  |  | $LabelForFormatting
| ) |  |
| static

Highlight all instances of the search string in the result label.

Parameters

  string | $SearchTerms | The string(s) to highlight, optionally array of strings
  string | $LabelForFormatting | The label in which to highlight the search string

Returns
  Returns the formatted label string

Definition at line 63 of file QuickSearchHelper.php.

References MetadataField\GetFactory().

static QuickSearchHelper::SearchField | ( | MetadataField | $Field,
|  |  | $SearchString,
|  | array | $IdExclusions = `array()`,
|  | array | $ValueExclusions = `array()`
| ) |  |
| static

Search a field for values matching a specified search string.

Parameters

  MetadataField | $Field | Metadata field.
  string | $SearchString | Search string.
  array | $IdExclusions | Array of IDs for values to exclude.
  array | $ValueExclusions | Array of values to exclude.

Returns
  Returns an array containing the number of search results, the number of additional search results available, and the search results.

Definition at line 26 of file QuickSearchHelper.php.

References MetadataSchema\MDFTYPE_REFERENCE, MetadataSchema\MDFTYPE_USER, MetadataField\NumAjaxResults(), and MetadataField\Type().

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

- interface/default/objects/QuickSearchHelper.php