You are here

protected function WebformSubmissionForm::getPreviousPage in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::getPreviousPage()

Get previous page's key.

Parameters

array $pages: An associative array of visible wizard pages.

string $current_page: The current page.

Return value

null|string The previous page's key. NULL if there is no previous page.

2 calls to WebformSubmissionForm::getPreviousPage()
WebformSubmissionForm::actions in src/WebformSubmissionForm.php
Returns an array of supported actions for the current entity form.
WebformSubmissionForm::previous in src/WebformSubmissionForm.php
Webform submission handler for the 'previous' action.

File

src/WebformSubmissionForm.php, line 2217

Class

WebformSubmissionForm
Provides a webform to collect and edit submissions.

Namespace

Drupal\webform

Code

protected function getPreviousPage(array $pages, $current_page) {
  return WebformArrayHelper::getPreviousKey($pages, $current_page);
}