We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isFirstPage()
isLastPage()
1 parent c7ce246 commit 586baa0Copy full SHA for 586baa0
components/browser_kit.rst
@@ -329,6 +329,20 @@ history::
329
// go forward to documentation page
330
$crawler = $client->forward();
331
332
+ // check if the history position is on the first page
333
+ if (!$client->history()->isFirstPage()) {
334
+ $crawler = $client->back();
335
+ }
336
+
337
+ // check if the history position is on the last page
338
+ if (!$client->history()->isLastPage()) {
339
+ $crawler = $client->forward();
340
341
342
+.. versionadded:: 7.4
343
344
+ The ``isFirstPage`` and ``isLastPage`` methods were introduced in Symfony 7.4.
345
346
You can delete the client's history with the ``restart()`` method. This will
347
also delete all the cookies::
348
0 commit comments