You are here

protected function LoginDestinationManager::getCurrentPath in Login Destination 8

Same name and namespace in other branches
  1. 8.2 src/LoginDestinationManager.php \Drupal\login_destination\LoginDestinationManager::getCurrentPath()

Get current path.

Return value

string

1 call to LoginDestinationManager::getCurrentPath()
LoginDestinationManager::findDestination in src/LoginDestinationManager.php
Find destination.

File

src/LoginDestinationManager.php, line 194

Class

LoginDestinationManager
Defines a login destination manager service.

Namespace

Drupal\login_destination

Code

protected function getCurrentPath() {
  $current = $this->requestStack
    ->getCurrentRequest()
    ->get('current', '');
  if (empty($current)) {
    $current = $this->currentPath
      ->getPath();
  }
  return $current;
}