Important

You are browsing upcoming documentation for version 6.0 of OroCommerce, OroCRM, and OroPlatform, scheduled for release in 2024. 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

{
    results: [{id: '<value>', label: '<label>'}, ...],
    more: '<more>'
}

Kind: instance method of SearchApiAccessor

Param

Type

response

Object