• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/wizard.php
  • Класс: CWizardBase
  • Вызов: CWizardBase::Display
function Display()
{
	$currentStep = &$this->currentStepID;

	//What button has just been pressed
	if ($this->IsPrevButtonClick())
		$currentStep = $this->GetPrevStepID();
	elseif ($this->IsNextButtonClick())
		$currentStep = $this->GetNextStepID();
	elseif ($this->IsCancelButtonClick())
		$currentStep = $this->GetCancelStepID();
	elseif ($this->IsFinishButtonClick())
		$currentStep = $this->GetFinishStepID();

	//Execute current step action
	if ( isset($_REQUEST[$this->currentStepHiddenID]) && isset($this->wizardSteps[$_REQUEST[$this->currentStepHiddenID]]) )
	{
		$oCurrentStep = $this->wizardSteps[$_REQUEST[$this->currentStepHiddenID]];
		if (method_exists($oCurrentStep, "OnPostForm"))
		{
			$oCurrentStep->OnPostForm();
			if (!empty($oCurrentStep->stepErrors))
				$currentStep = $_REQUEST[$this->currentStepHiddenID];
		}
	}

	//If step is not found, show a first step
	if (!isset($this->wizardSteps[$currentStep]))
	{
		if (isset($this->wizardSteps[$this->firstStepID]))
			$currentStep = $this->firstStepID;
		else
		{
			$this->__ShowError("Wizard has no any step");
			return;
		}
	}

	return $this->_DisplayStep();
}