You are here

public function Suggestion::getUrl in Search API Autocomplete 8

Retrieves the URL to which the suggestion should redirect.

A URL to which the suggestion should redirect instead of completing the user input in the text field. This overrides the normal behavior and thus makes the suggested keys obsolete.

Return value

\Drupal\Core\Url|null The URL to which the suggestion should redirect to, or NULL if none was set.

Overrides SuggestionInterface::getUrl

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

File

src/Suggestion/Suggestion.php, line 125

Class

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

Namespace

Drupal\search_api_autocomplete\Suggestion

Code

public function getUrl() {
  return $this->url;
}