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

	if ($wizard->IsNextButtonClick())
	{
		$arServices = $package->serviceID;
		if (!is_array($arServices))
		{
			if ($package->serviceExists)
				$wizard->SetCurrentStep(BX_WIZARD_SELECT_STRUCTURE_ID);
			else
				$wizard->SetCurrentStep(BX_WIZARD_START_INSTALL_ID);
			return;
		}

		foreach ($arServices as $service)
		{
			if (!array_key_exists($service, $package->arServices))
					continue;

			if ($package->_InitSubStep("select", $package->arServices[$service], false))
			{
				$wizard->SetCurrentStep($package->__obFirstStep->GetStepID());
				$package->__obFirstStep->SetPrevStep(BX_WIZARD_SELECT_SERVICE_ID);
				break;
			}
			else
			{
				if ($package->serviceExists)
					$wizard->SetCurrentStep(BX_WIZARD_SELECT_STRUCTURE_ID);
				else
					$wizard->SetCurrentStep(BX_WIZARD_START_INSTALL_ID);
				//$wizard->SetCurrentStep("__start_install");
			}
		}
	}
}