You are here

protected function LoginDestinationManager::getCurrentPath in Login Destination 8.2

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

Get current path.

Return value

string Returns the current path.

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

File

src/LoginDestinationManager.php, line 213

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;
}