You are here

public function DisplayPluginBase::getUrl in Search API 8

Returns the URL of this display.

Return value

\Drupal\Core\Url|null The URL of the display, or NULL if there is no specific URL for it.

Overrides DisplayInterface::getUrl

Deprecated

in search_api:8.x-1.0-beta5 and is removed from search_api:2.0.0. Use getPath() instead.

See also

https://www.drupal.org/node/2856050

File

src/Display/DisplayPluginBase.php, line 139

Class

DisplayPluginBase
Defines a base class from which other display classes may extend.

Namespace

Drupal\search_api\Display

Code

public function getUrl() {
  @trigger_error('\\Drupal\\search_api\\Display\\DisplayInterface::getUrl() is deprecated in Search API 8.x-1.0 Beta 5. Use ::getPath() instead. See https://www.drupal.org/node/2856050', E_USER_DEPRECATED);
  if ($path = $this
    ->getPath()) {
    return Url::fromUserInput($path);
  }
  return NULL;
}