本文整理汇总了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()) {
示例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"]);