• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/wizard_site.php
  • Класс: CWizard
  • Вызов: CWizard::__GetUserStep
function __GetUserStep($stepName, &$step)
{
	$stepName = mb_strtoupper($stepName);

	if (!array_key_exists("STEPS_SETTINGS", $this->arDescription) || !array_key_exists($stepName, $this->arDescription["STEPS_SETTINGS"]))
		return false;

	if (!isset($this->arDescription["STEPS_SETTINGS"][$stepName]["SCRIPT"]) || !isset($this->arDescription["STEPS_SETTINGS"][$stepName]["CLASS"]))
		return false;

	$scriptPath = $this->arDescription["STEPS_SETTINGS"][$stepName]["SCRIPT"];
	$stepClass = $this->arDescription["STEPS_SETTINGS"][$stepName]["CLASS"];

	$pathToFile = $_SERVER["DOCUMENT_ROOT"].$this->path."/".$scriptPath;
	if (!is_file($pathToFile))
		return false;

	$this->IncludeWizardLang($scriptPath);
	include_once($pathToFile);

	if (!class_exists($stepClass))
		return false;

	$step = new $stepClass;

	if (!is_subclass_of($step, "CWizardStep"))
		return false;

	return true;
}