You are here

public function ToolbarController::reloadPage in Helper 8

Reload the previous page.

3 calls to ToolbarController::reloadPage()
ToolbarController::flushBootstrap in src/Controller/ToolbarController.php
Flush the bootstrap cache.
ToolbarController::flushLibraries in src/Controller/ToolbarController.php
Flush the libraries (and CSS/JS) cache.
ToolbarController::flushPhp in src/Controller/ToolbarController.php
Flush the PHP caches.

File

src/Controller/ToolbarController.php, line 45

Class

ToolbarController
Toolbar controller.

Namespace

Drupal\helper\Controller

Code

public function reloadPage() {
  $request = $this->requestStack
    ->getCurrentRequest();
  if ($request->server
    ->get('HTTP_REFERER')) {
    return $request->server
      ->get('HTTP_REFERER');
  }
  else {
    return '/';
  }
}