当前位置: 首页>>代码示例>>PHP>>正文


PHP CIBlockElement::WF_GetHistoryList方法代码示例

本文整理汇总了PHP中CIBlockElement::WF_GetHistoryList方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockElement::WF_GetHistoryList方法的具体用法?PHP CIBlockElement::WF_GetHistoryList怎么用?PHP CIBlockElement::WF_GetHistoryList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CIBlockElement的用法示例。


在下文中一共展示了CIBlockElement::WF_GetHistoryList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CAdminResult

                        } else {
                            $DB->Commit();
                        }
                    }
                }
                break;
            case "restore":
                if (!CIBlockElement::WF_Restore($ID)) {
                    $lAdmin->AddGroupError(GetMessage("IBLOCK_ADM_HISTORY_RESTORE_ERROR"), $ID);
                }
                break;
        }
    }
}
// dataset
$rsData = CIBlockElement::WF_GetHistoryList($ELEMENT_ID, $by, $order, $arFilter, $is_filtered);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
// navigation
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("IBLOCK_ADM_HISTORY_PAGER")));
// list headers
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => GetMessage("IBLOCK_FIELD_ID"), "sort" => "s_id", "default" => true), array("id" => "NAME", "content" => GetMessage("IBLOCK_FIELD_NAME"), "sort" => "s_name", "default" => true), array("id" => "WF_STATUS_ID", "content" => GetMessage("IBLOCK_FIELD_STATUS"), "sort" => "s_status", "default" => true), array("id" => "MODIFIED_BY", "content" => GetMessage("IBLOCK_FIELD_USER_NAME"), "sort" => "s_modified_by", "default" => true), array("id" => "TIMESTAMP_X", "content" => GetMessage("IBLOCK_FIELD_TIMESTAMP_X"), "sort" => "s_timestamp_x", "default" => true)));
// list
while ($arRes = $rsData->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $arRes);
    if ($f_MODIFIED_BY > 0) {
        $row->AddViewField("MODIFIED_BY", '[<a href="user_edit.php?lang=' . LANG . '&ID=' . $f_MODIFIED_BY . '">' . $f_MODIFIED_BY . '</a>] ' . $f_USER_NAME . '</a>');
    }
    $row->AddViewField("WF_STATUS_ID", '[<a href="workflow_status_edit.php?ID=' . $f_WF_STATUS_ID . '&lang=' . LANG . '">' . $f_WF_STATUS_ID . '</a>] ' . htmlspecialcharsex(CIBlockElement::WF_GetStatusTitle($f_WF_STATUS_ID)));
    $arActions = array();
    $arActions[] = array("ICON" => "view", "DEFAULT" => true, "TEXT" => GetMessage("IBLOCK_ADM_HISTORY_VIEW"), "TITLE" => GetMessage("IBLOCK_ADM_HISTORY_VIEW_ALT"), "ACTION" => $lAdmin->ActionRedirect('iblock_element_edit.php?type=' . $type . '&ID=' . $f_ID . '&lang=' . LANG . '&IBLOCK_ID=' . $IBLOCK_ID . '&view=Y&find_section_section=' . $find_section_section));
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:iblock_history_list.php

示例2: elseif

    $res["EDIT"] = "N";
} elseif (CWebDavIblock::CheckRight($arResult["ELEMENT"]["PERMISSION"], "element_bizproc_start") == "U") {
    $res["EDIT"] = $arResult["ELEMENT"]["WF_STATUS_ID"] > 1 && $arResult["WF_STATUSES_PERMISSION"][$arResult["ELEMENT"]["WF_STATUS_ID"]] < 2 ? "N" : "Y";
}
$arResult["ELEMENT"]["SHOW"] = $res;
/************** Last element ***************************************/
$arResult["ELEMENT"]["LAST"] = $arResult["ELEMENT"];
$LAST_ID = CIBlockElement::WF_GetLast($arResult["ELEMENT"]["ID"]);
if ($LAST_ID != $arResult["ELEMENT"]["ID"]) {
    $db_res = CIBlockElement::GetByID($LAST_ID);
    if ($db_res && ($res = $db_res->Fetch())) {
        $arResult["ELEMENT"]["LAST"] = $res;
    }
}
/************** Versions *******************************************/
$db_res = CIBlockElement::WF_GetHistoryList($arParams['ELEMENT_ID'], $by = 's_id', $order = 'desc', array("IBLOCK_ID" => $arParams['IBLOCK_ID']), $is_filtered);
if ($db_res) {
    $db_res->NavStart($arParams["PAGE_ELEMENTS"]);
    $arResult["NAV_RESULT"] = $db_res;
    $arResult["NAV_STRING"] = $db_res->GetPageNavStringEx($navComponentObject, GetMessage("WD_DOCUMENTS"), $arParams["PAGE_NAVIGATION_TEMPLATE"]);
    if ($this->__parent) {
        $this->__parent->arResult["HISTORY_LENGTH"] = $db_res->NavRecordCount;
    }
    $nameTemplate = $arParams['NAME_TEMPLATE'];
    if (empty($nameTemplate)) {
        $nameTemplate = CSite::GetNameFormat();
    }
    if ($res = $db_res->GetNext()) {
        do {
            if (isset($arParams["OBJECT"])) {
                $dbPropRes = CIBlockElement::GetProperty($arParams["IBLOCK_ID"], $res["ID"], "sort", "asc", array("CODE" => $arParams["OBJECT"]->file_prop));
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


注:本文中的CIBlockElement::WF_GetHistoryList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。