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

Breadcrumb

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

function History::forward

Goes forward in the history.

Throws

LogicException if the stack is already on the last page

File

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

Class

History
History.

Namespace

Symfony\Component\BrowserKit

Code

public function forward() : Request {
    if ($this->position > \count($this->stack) - 2) {
        throw new LogicException('You are already on the last page.');
    }
    return clone $this->stack[++$this->position];
}
RSS feed
Powered by Drupal