Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. History.php

function History::back

Goes back in the history.

Throws

LogicException if the stack is already on the first page

File

vendor/symfony/browser-kit/History.php, line 58

Class

History
History.

Namespace

Symfony\Component\BrowserKit

Code

public function back() : Request {
    if ($this->position < 1) {
        throw new LogicException('You are already on the first page.');
    }
    return clone $this->stack[--$this->position];
}
RSS feed
Powered by Drupal