Important

You are browsing the documentation for version 4.1 of OroCommerce, OroCRM and OroPlatform, which is no longer maintained. Read version 5.1 (the latest LTS version) of the Oro documentation to get up-to-date information.

See our Release Process documentation for more information on the currently supported and upcoming releases.

SearchApiAccessor

SearchApiAccessorApiAccessor. Provides access to the search API for autocomplete. This class is by design to be initiated from the server configuration.

Extends: ApiAccessor

Param

Type

Description

options

Object

Options container Also check the options for ApiAccessor

options.search_handler_name

string

Name of the search handler to use

options.label_field_name

string

Name of the property that will be used as a label

options.value_field_name

string

Optional. Name of the property that will be used as an identifier. By default = ‘id’

searchApiAccessor.prepareUrlParameters()

Kind: instance method of SearchApiAccessor

searchApiAccessor.formatResult(response) ⇒ Object

Formats response before it is sent out from this api accessor. Converts it to form

1 {
2     results: [{id: '<value>', label: '<label>'}, ...],
3     more: '<more>'
4 }

Kind: instance method of SearchApiAccessor

Param

Type

response

Object