interface EntityAutocompleteMatcherInterface (View source)

Methods

array
getMatches(string $target_type, string $selection_handler, array $selection_settings, string $string = '')

Gets matched labels based on a given search string.

Details

array getMatches(string $target_type, string $selection_handler, array $selection_settings, string $string = '')

Gets matched labels based on a given search string.

Parameters

string $target_type

The ID of the target entity type.

string $selection_handler

The plugin ID of the entity reference selection handler.

array $selection_settings

An array of settings that will be passed to the selection handler.

string $string

(optional) The label of the entity to query by.

Return Value

array

An array of matched entity labels, in the format required by the AJAX autocomplete API (e.g. array('value' => $value, 'label' => $label)).

Exceptions

AccessDeniedHttpException

See also

EntityAutocompleteController