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


PHP CIBlockRights::Post2Array方法代碼示例

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


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

示例1: array_merge

     $arFields["SECTION_NAME"] = $SECTION_NAME;
     $arFields["SECTION_ADD"] = $SECTION_ADD;
     $arFields["SECTION_EDIT"] = $SECTION_EDIT;
     $arFields["SECTION_DELETE"] = $SECTION_DELETE;
 }
 if (COption::GetOptionString("iblock", "show_xml_id", "N") == "Y" && is_set($_POST, "XML_ID")) {
     $arFields["XML_ID"] = $_POST["XML_ID"];
 }
 if ($arIBTYPE["IN_RSS"] == "Y") {
     $arFields = array_merge($arFields, array("RSS_ACTIVE" => $RSS_ACTIVE, "RSS_FILE_ACTIVE" => $RSS_FILE_ACTIVE, "RSS_YANDEX_ACTIVE" => $RSS_YANDEX_ACTIVE, "RSS_FILE_LIMIT" => $RSS_FILE_LIMIT, "RSS_FILE_DAYS" => $RSS_FILE_DAYS, "RSS_TTL" => $RSS_TTL));
 }
 if (CIBlockRights::UserHasRightTo($ID, $ID, "iblock_rights_edit")) {
     $arFields["RIGHTS_MODE"] = $RIGHTS_MODE;
     if ($arFields["RIGHTS_MODE"] == "E") {
         if (is_array($_POST["RIGHTS"])) {
             $arFields["RIGHTS"] = CIBlockRights::Post2Array($_POST["RIGHTS"]);
         } elseif (is_array($_POST["GROUP"])) {
             $arFields["GROUP_ID"] = $_POST["GROUP"];
         } else {
             $arFields["RIGHTS"] = array();
         }
     } else {
         $arFields["GROUP_ID"] = $GROUP;
     }
 }
 //Assembly properties for check followed by add/update
 $ibp = new CIBlockProperty();
 $arProperties = array();
 if ($ID > 0) {
     $props = CIBlockProperty::GetList(array(), array("IBLOCK_ID" => $ID, "CHECK_PERMISSIONS" => "N"));
     while ($p = $props->Fetch()) {
開發者ID:Satariall,項目名稱:izurit,代碼行數:31,代碼來源:iblock_edit.php

示例2: while

         while ($arPropV = $dbPropV->Fetch()) {
             if ($arPropV["PROPERTY_TYPE"] != "F" && empty($arProps[$arPropV["ID"]])) {
                 if (!array_key_exists($arPropV["ID"], $arElement["PROPERTY_VALUES"])) {
                     $arElement["PROPERTY_VALUES"][$arPropV["ID"]] = array();
                 }
                 $arElement["PROPERTY_VALUES"][$arPropV["ID"]][$arPropV["PROPERTY_VALUE_ID"]] = array("VALUE" => $arPropV["VALUE"], "DESCRIPTION" => $arPropV["DESCRIPTION"]);
             }
             if ($arPropV["USER_TYPE"] == "DiskFile") {
                 $oldPropertyValues[$arPropV["ID"]][$arPropV["PROPERTY_VALUE_ID"]]["VALUE"] = $arPropV["VALUE"];
             }
         }
     }
 }
 if ($arResult["IBLOCK"]["RIGHTS_MODE"] === 'E' && $arResult["CAN_EDIT_RIGHTS"]) {
     if (is_array($_POST["RIGHTS"])) {
         $arPOSTRights = CIBlockRights::Post2Array($_POST["RIGHTS"]);
     } else {
         $arPOSTRights = array();
     }
     if ($ELEMENT_ID) {
         $obRights = new CIBlockElementRights($arResult["IBLOCK_ID"], $ELEMENT_ID);
     } else {
         $obRights = new CIBlockSectionRights($arResult["IBLOCK_ID"], $SECTION_ID);
     }
     $arDBRights = $obRights->GetRights();
     $arElement["RIGHTS"] = CListPermissions::MergeRights($arParams["~IBLOCK_TYPE_ID"], $arDBRights, $arPOSTRights);
 }
 //---BP---
 $arResult["isConstantsTuned"] = false;
 if ($bBizproc) {
     $documentType = BizProcDocument::generateDocumentComplexType($arParams["IBLOCK_TYPE_ID"], $arResult["IBLOCK_ID"]);
開發者ID:webgksupport,項目名稱:alpina,代碼行數:31,代碼來源:component.php


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