You are here

public function Suggestion::getLabel in Search API Autocomplete 8

Retrieves the label to use for the suggestion.

Should only be used if the other fields that will be displayed (suggestion prefix/suffix and user input) are empty.

Return value

string The suggestion's label.

Overrides SuggestionInterface::getLabel

1 call to Suggestion::getLabel()
Suggestion::toRenderable in src/Suggestion/Suggestion.php
Returns a render array representation of the object.

File

src/Suggestion/Suggestion.php, line 139

Class

Suggestion
Provides a value object meant to be used as result of suggestions.

Namespace

Drupal\search_api_autocomplete\Suggestion

Code

public function getLabel() {
  return $this->label;
}