当前位置: 首页>>代码示例>>PHP>>正文


PHP CBXFeatures::InitiateEditionsSettings方法代码示例

本文整理汇总了PHP中CBXFeatures::InitiateEditionsSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP CBXFeatures::InitiateEditionsSettings方法的具体用法?PHP CBXFeatures::InitiateEditionsSettings怎么用?PHP CBXFeatures::InitiateEditionsSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBXFeatures的用法示例。


在下文中一共展示了CBXFeatures::InitiateEditionsSettings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: OnPostForm

 function OnPostForm()
 {
     $wizard =& $this->GetWizard();
     $serviceID = $wizard->GetVar("nextStep");
     $serviceStage = $wizard->GetVar("nextStepStage");
     if ($serviceID == "finish") {
         $wizard->SetCurrentStep("finish");
         return;
     }
     $defSiteName = GetMessage("MAIN_DEFAULT_SITE_NAME");
     $wizard->GetVar("siteName");
     if ($wizard->GetVar("siteName") != "") {
         $defSiteName = $wizard->GetVar("siteName");
     }
     $res = false;
     $site_id = $wizard->GetVar("siteID");
     if ($site_id != "") {
         $db_res = CSite::GetList($by = "sort", $order = "desc", array("LID" => $site_id));
         if ($db_res) {
             $res = $db_res->Fetch();
         }
     }
     if ($res) {
         $obSite = new CSite();
         $result = $obSite->Update($site_id, array("NAME" => $defSiteName, "SITE_NAME" => $defSiteName));
     } elseif ($res && $res["NAME"] == GetMessage("MAIN_DEFAULT_SITE_NAME")) {
         $SiteNAME = $defSiteName . " (" . GetMessage("MAIN_DEFAULT_SITE_NAME") . ")";
         $obSite = new CSite();
         $result = $obSite->Update($site_id, array("NAME" => $SiteNAME, "SITE_NAME" => $defSiteName));
     }
     $arServices = WizardServices::GetServices($_SERVER["DOCUMENT_ROOT"] . $wizard->GetPath(), "/site/services/");
     if ($_SERVER["PHP_SELF"] == "/index.php" && !NON_INTRANET_EDITION) {
         $arEditions = array("Portal");
         if (EDITION == "E" || EDITION == "C" || EDITION == "H") {
             $arEditions[] = "Communications";
         }
         if (EDITION == "E" || EDITION == "H") {
             $arEditions[] = "Enterprise";
         }
         if (EDITION == "H") {
             $arEditions[] = "Holding";
         }
         CBXFeatures::InitiateEditionsSettings($arEditions);
         if ($wizard->GetVar("allowSocial") != "Y") {
             $ar = array("Friends", "PersonalPhoto", "PersonalForum", "Blog", "Forum", "Gallery");
             foreach ($ar as $f) {
                 CBXFeatures::SetFeatureEnabled($f, false);
             }
         }
         CBXFeatures::SetFeatureEnabled("Analytics", false);
     }
     //define("WIZARD_IS_RERUN", $_SERVER["PHP_SELF"] != "/index.php");
     if ($_SERVER["PHP_SELF"] != "/index.php") {
         unset($arServices["users"]);
         unset($arServices["iblock_demo_data"]);
         unset($arServices["medialibrary"]);
         if ($wizard->GetVar("installDemoData") != "Y") {
             $s = array();
             foreach ($arServices["main"]["STAGES"] as $v) {
                 if (!in_array($v, array("property.php", "options.php"))) {
                     $s[] = $v;
                 }
             }
             $arServices["main"]["STAGES"] = $s;
             //unset($arServices["forum"]);
             //unset($arServices["search"]);
             //unset($arServices["files"]);
             //unset($arServices["iblock"]);
             //unset($arServices["advertising"]);
             //unset($arServices["vote"]);
             //unset($arServices["learning"]);
             //unset($arServices["form"]);
             //unset($arServices["subscribe"]);
             //unset($arServices["blog"]);
             //unset($arServices["socialnetwork"]);
             //unset($arServices["intranet"]);
             //unset($arServices["support"]);
             //unset($arServices["workflow"]);
             //unset($arServices["fileman"]);
             //unset($arServices["statistic"]);
         }
     }
     if ($serviceStage == "skip") {
         $success = true;
     } else {
         $success = $this->InstallService($serviceID, $serviceStage);
     }
     list($nextService, $nextServiceStage, $stepsComplete, $status) = $this->GetNextStep($arServices, $serviceID, $serviceStage);
     if ($nextService == "finish") {
         if (LANGUAGE_ID != "ru") {
             CBXFeatures::SetFeatureEnabled("Salary", false);
         }
         $formName = $wizard->GetFormName();
         $response = "window.ajaxForm.StopAjax(); window.ajaxForm.SetStatus('100'); window.ajaxForm.Post('" . $nextService . "', '" . $nextServiceStage . "','" . $status . "');";
     } else {
         $arServiceID = array_keys($arServices);
         $lastService = array_pop($arServiceID);
         $stepsCount = $arServices[$lastService]["POSITION"];
         if (array_key_exists("STAGES", $arServices[$lastService]) && is_array($arServices[$lastService])) {
             $stepsCount += count($arServices[$lastService]["STAGES"]) - 1;
//.........这里部分代码省略.........
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:101,代码来源:wizard.php


注:本文中的CBXFeatures::InitiateEditionsSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。