You are here

public function DisplayPluginBase::getCurrentPath in Search API 8

Retrieves the current path service.

Return value

\Drupal\Core\Path\CurrentPathStack The current path service.

File

src/Display/DisplayPluginBase.php, line 70

Class

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

Namespace

Drupal\search_api\Display

Code

public function getCurrentPath() {
  return $this->currentPath ?: \Drupal::service('path.current');
}