本文整理匯總了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"]);