当前位置: 首页>>代码示例>>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;未经允许,请勿转载。