You are here

public function TriggerController::execute in Build Hooks 8

1 string reference to 'TriggerController::execute'
build_hooks.routing.yml in ./build_hooks.routing.yml
build_hooks.routing.yml

File

src/Controller/TriggerController.php, line 39

Class

TriggerController
Class TriggerController.

Namespace

Drupal\build_hooks\Controller

Code

public function execute() {
  $previousUrl = \Drupal::request()->server
    ->get('HTTP_REFERER');
  $referer = Request::create($previousUrl);
  $this->buildHooksTrigger
    ->execute();
  return new RedirectResponse($referer
    ->getRequestUri());
}