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