CWIS Developer Documentation
|
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... | |
static | PrintQuickSearchField ($FieldId, $CurrentValue, $CurrentDisplayValue, $CloneAfter=FALSE, $FormFieldName=NULL) |
Print the blank text field quick search field for the QuickSearch JS object. More... | |
static | SearchForUsers ($SearchString, $MaxResults=15, array $IdExclusions=array(), array $ValueExclusions=array()) |
Perform a search for users. More... | |
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.
|
static |
Highlight all instances of the search string in the result label.
string | $SearchTerms | The string(s) to highlight, optionally array of strings |
string | $LabelForFormatting | The label in which to highlight the search string |
Definition at line 63 of file QuickSearchHelper.php.
|
static |
Print the blank text field quick search field for the QuickSearch JS object.
int | $FieldId | The FieldId for the form element to assign |
int | $CurrentValue | The option's Id value, not for user display |
string | $CurrentDisplayValue | The value to initially populate the field with |
boolean | $CloneAfter | Whether to place a clone after this field |
string | $FormFieldName | Value to use for the input name attribute in the generated html (OPTIONAL, defaults to field name) |
Definition at line 141 of file QuickSearchHelper.php.
References ApplicationFramework\ORDER_FIRST, and PHP.
Referenced by FormUI\DisplayFormField().
|
static |
Search a field for values matching a specified search string.
MetadataField | $Field | Metadata field. |
string | $SearchString | Search string. |
array | $IdExclusions | Array of IDs for values to exclude. |
array | $ValueExclusions | Array of values to exclude. |
Definition at line 26 of file QuickSearchHelper.php.
References MetadataSchema\MDFTYPE_REFERENCE, MetadataSchema\MDFTYPE_USER, MetadataField\NumAjaxResults(), and MetadataField\Type().
|
static |
Perform a search for users.
string | $SearchString | Search string. |
int | $MaxResults | The maximum number of search results. |
array | $IdExclusions | Array of user IDs for users to exclude. |
array | $ValueExclusions | Array of values to exclude. |
Definition at line 213 of file QuickSearchHelper.php.
References MetadataField\GetFactory().