You are here

public function Webform::getPages in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Entity/Webform.php \Drupal\webform\Entity\Webform::getPages()

Get webform wizard pages.

Parameters

string $operation: The webform submission operation. Usually 'default', 'add', 'edit', 'edit_all', 'api', or 'test'.

\Drupal\webform\WebformSubmissionInterface|null $webform_submission: (Optional) A webform submission. If a webform submission is defined and the 'wizard_progress_states' is TRUE, wizard page conditional logic will be evaluated.

Return value

array An associative array of webform wizard pages.

Overrides WebformInterface::getPages

See also

\Drupal\webform\Entity\WebformSubmission

1 call to Webform::getPages()
Webform::getPage in src/Entity/Webform.php
Get webform wizard page.

File

src/Entity/Webform.php, line 2011

Class

Webform
Defines the webform entity.

Namespace

Drupal\webform\Entity

Code

public function getPages($operation = 'default', WebformSubmissionInterface $webform_submission = NULL) {
  $pages = $this
    ->buildPages($operation);
  if ($this
    ->getSetting('wizard_progress_states') && $webform_submission) {

    /** @var \Drupal\webform\WebformSubmissionConditionsValidatorInterface $constraint_validator */
    $constraint_validator = \Drupal::service('webform_submission.conditions_validator');
    $pages = $constraint_validator
      ->buildPages($pages, $webform_submission);
  }
  return $pages;
}