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

Breadcrumb

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

function History::current

Returns the current element in the history.

Throws

LogicException if the stack is empty

File

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

Class

History
History.

Namespace

Symfony\Component\BrowserKit

Code

public function current() : Request {
    if (-1 === $this->position) {
        throw new LogicException('The page history is empty.');
    }
    return clone $this->stack[$this->position];
}
RSS feed
Powered by Drupal