You are here

public function ScssCompilerController::reloadPage in SCSS/Less Compiler 8

Reload the previous page.

1 call to ScssCompilerController::reloadPage()
ScssCompilerController::flush in src/Controller/ScssCompilerController.php
Recompile all source files.

File

src/Controller/ScssCompilerController.php, line 56

Class

ScssCompilerController
ScssCompiler controller object.

Namespace

Drupal\scss_compiler\Controller

Code

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