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


PHP CList::is_readonly方法代碼示例

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


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

示例1: array

            }
        }
        $data["~LIST_FIELD_EDIT_URL"] = str_replace(array("#list_id#", "#field_id#", "#group_id#"), array($arResult["IBLOCK_ID"], $ID, $arParams["SOCNET_GROUP_ID"]), $arParams["~LIST_FIELD_EDIT_URL"]);
        $data["LIST_FIELD_EDIT_URL"] = htmlspecialcharsbx($data["~LIST_FIELD_EDIT_URL"]);
        $aCols = array("TYPE" => $arResult["TYPES"][$data["TYPE"]], "NAME" => '<a target="_self" href="' . $data["LIST_FIELD_EDIT_URL"] . '">' . $data["NAME"] . '</a>');
        $aActions = array(array("ICONCLASS" => "edit", "TEXT" => GetMessage("CC_BLF_ACTION_MENU_EDIT"), "ONCLICK" => "jsUtils.Redirect(arguments, '" . CUtil::JSEscape($data["~LIST_FIELD_EDIT_URL"]) . "')", "DEFAULT" => true));
        if ($data["TYPE"] != "NAME") {
            $aActions[] = array("SEPARATOR" => true);
            $aActions[] = array("ICONCLASS" => "delete", "TEXT" => GetMessage("CC_BLF_ACTION_MENU_DELETE"), "ONCLICK" => "bxGrid_" . $arResult["GRID_ID"] . ".DeleteItem('" . $ID . "', '" . GetMessage("CC_BLF_ACTION_MENU_DELETE_CONF") . "')");
        }
        $aEditable = array();
        if ($obList->is_field($arField["TYPE"])) {
            $aEditable["MULTIPLE"] = false;
            $data["MULTIPLE"] = "N";
        }
        if ($obList->is_readonly($ID)) {
            $aEditable["IS_REQUIRED"] = false;
            $data["IS_REQUIRED"] = "N";
        } elseif ($ID == "NAME") {
            $aEditable["IS_REQUIRED"] = false;
            $data["IS_REQUIRED"] = "Y";
        }
        $arResult["ROWS"][] = array("id" => $ID, "data" => $data, "actions" => $aActions, "columns" => $aCols, "editable" => $aEditable);
    }
    $CACHE_MANAGER->EndTagCache();
    $this->EndResultCache();
}
$this->IncludeComponentTemplate();
if ($arParams["IBLOCK_TYPE_ID"] == COption::GetOptionString("lists", "livefeed_iblock_type_id")) {
    $APPLICATION->SetTitle(GetMessage("CC_BLF_TITLE_EDIT_PROCESS", array("#NAME#" => $arResult["IBLOCK"]["NAME"])));
} else {
開發者ID:Satariall,項目名稱:izurit,代碼行數:31,代碼來源:component.php

示例2: unset

}
if (preg_match("/^(G|G:|E|E:)/", $data["TYPE"])) {
    $arResult["LINK_IBLOCKS"] = CLists::GetIBlocks($arParams["~IBLOCK_TYPE_ID"], !$arParams["CAN_EDIT"], $arParams["~SOCNET_GROUP_ID"]);
    if (substr($data["TYPE"], 0, 1) == "G") {
        unset($arResult["LINK_IBLOCKS"][$arResult["IBLOCK_ID"]]);
    }
}
$arResult["FORM_DATA"] = array();
foreach ($data as $key => $value) {
    $arResult["FORM_DATA"]["~" . $key] = $value;
    if (is_array($value)) {
        foreach ($value as $key1 => $value1) {
            $value[$key1] = htmlspecialcharsbx($value1);
        }
        $arResult["FORM_DATA"][$key] = $value;
    } else {
        $arResult["FORM_DATA"][$key] = htmlspecialcharsbx($value);
    }
}
$arResult["CAN_BE_MULTIPLE"] = !$obList->is_field($data["TYPE"]);
$arResult["CAN_BE_OPTIONAL"] = $data["TYPE"] != "NAME";
$arResult["IS_READ_ONLY"] = $arResult["FIELD_ID"] ? $obList->is_readonly($arResult["FIELD_ID"]) : CListFieldTypeList::GetByID($data["TYPE"])->IsReadonly();
$this->IncludeComponentTemplate();
if ($arResult["FIELD_ID"]) {
    $APPLICATION->SetTitle(GetMessage("CC_BLFE_TITLE_EDIT", array("#NAME#" => htmlspecialcharsex($arResult["FIELD"]["NAME"]))));
} else {
    $APPLICATION->SetTitle(GetMessage("CC_BLFE_TITLE_NEW"));
}
$APPLICATION->AddChainItem($arResult["IBLOCK"]["NAME"], $arResult["~LIST_URL"]);
$APPLICATION->AddChainItem(GetMessage("CC_BLFE_CHAIN_LIST_EDIT"), $arResult["~LIST_EDIT_URL"]);
$APPLICATION->AddChainItem(GetMessage("CC_BLFE_CHAIN_FIELDS"), $arResult["~LIST_FIELDS_URL"]);
開發者ID:Satariall,項目名稱:izurit,代碼行數:31,代碼來源:component.php


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