當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WizardServices::CreateSectionProperty方法代碼示例

本文整理匯總了PHP中WizardServices::CreateSectionProperty方法的典型用法代碼示例。如果您正苦於以下問題:PHP WizardServices::CreateSectionProperty方法的具體用法?PHP WizardServices::CreateSectionProperty怎麽用?PHP WizardServices::CreateSectionProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WizardServices的用法示例。


在下文中一共展示了WizardServices::CreateSectionProperty方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

if ($arIBlock = $rsIBlock->Fetch()) {
    $iblockID = $arIBlock["ID"];
}
if ($iblockID == false && WIZARD_SITE_ID == "s1") {
    $rsIBlock = CIBlock::GetList(array(), array("CODE" => "meeting_rooms", "TYPE" => $iblockType));
    if ($arIBlock = $rsIBlock->Fetch()) {
        $iblockID = $arIBlock["ID"];
    }
}
if ($iblockID == false) {
    $iblockID = WizardServices::ImportIBlockFromXML($iblockXMLFile, "meeting_rooms_temp", $iblockType, WIZARD_SITE_ID, $permissions = array("1" => "X", "2" => "R", WIZARD_PORTAL_ADMINISTRATION_GROUP => "X", WIZARD_PERSONNEL_DEPARTMENT_GROUP => "W", WIZARD_DIRECTION_GROUP => "W"));
    if ($iblockID < 1) {
        return;
    }
    WizardServices::CreateSectionProperty($iblockID, "UF__CAL_COL", $arFieldColorName);
    WizardServices::CreateSectionProperty($iblockID, "UF__CAL_EXP", $arFieldExportName);
    $ibSection = new CIBlockSection();
    $arColor = array("#DDBFEB", "#CEE669", "#98AEF6");
    $dbSection = CIBlockSection::GetList(array(), array("ACTIVE" => "Y", "IBLOCK_ID" => $iblockID));
    $i = 0;
    while ($arSection = $dbSection->Fetch()) {
        $color = isset($arColor[$i]) ? $arColor[$i] : $arColor[0];
        $ibSection->Update($arSection["ID"], array("ACTIVE" => "Y", "UF__CAL_COL" => $color, "UF__CAL_EXP" => "all"));
        $i++;
    }
    $arAF = array("UF_FLOOR" => array("NAME" => GetMessage("INAF_F_FLOOR"), "TYPE" => "integer"), "UF_PLACE" => array("NAME" => GetMessage("INAF_F_PLACE"), "TYPE" => "integer"), "UF_PHONE" => array("NAME" => GetMessage("INAF_F_PHONE"), "TYPE" => "string"));
    $arUserFields = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("IBLOCK_" . $iblockID . "_SECTION", 0, LANGUAGE_ID);
    $arKeys = Array_Keys($arAF);
    foreach ($arKeys as $key) {
        if (!Array_Key_Exists($key, $arUserFields)) {
            $arFields = array("ENTITY_ID" => "IBLOCK_" . $iblockID . "_SECTION", "FIELD_NAME" => $key, "USER_TYPE_ID" => $arAF[$key]["TYPE"]);
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:31,代碼來源:res.php


注:本文中的WizardServices::CreateSectionProperty方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。