- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/classes/general/wizard_site.php
- Класс: CWizard
- Вызов: CWizard::Install
function Install()
{
if ($this->__bInited)
return;
$this->__bInited = true;
if (!empty($this->arErrors))
{
/*Generate error step */
$this->__PackageError();
}
elseif ($this->pathToScript)
{
$package = $this;
if(isset($this->arDescription["PARENT"]) && $this->arDescription["PARENT"] == "wizard_sol")
{
$lang = LANGUAGE_ID;
$wizardPath = $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main";
$relativePath = "install/wizard_sol/wizard.php";
if ($lang != "en" && $lang != "ru")
{
if (file_exists(($fname = $wizardPath."/lang/".LangSubst($lang)."/".$relativePath)))
__IncludeLang($fname, false, true);
}
if (file_exists(($fname = $wizardPath."/lang/".$lang."/".$relativePath)))
__IncludeLang($fname, false, true);
}
$this->IncludeWizardLang("wizard.php");
include($this->pathToScript);
if (array_key_exists("STEPS", $this->arDescription) && is_array($this->arDescription["STEPS"]))
{
$wizardName = (array_key_exists("NAME", $this->arDescription) ? $this->arDescription["NAME"] : "");
$this->wizard = new CWizardBase($wizardName, $this);
$this->wizard->AddSteps($this->arDescription["STEPS"]);
$this->__SetTemplate();
$this->wizard->Display();
}
}
else
{
//Get description files
$this->__GetSites();
$this->__GetTemplates();
$this->__GetServices();
$this->__GetStructure();
//Generate system steps
$this->__Install();
}
}