本文整理汇总了PHP中CIBlockElement::WF_GetStatusTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockElement::WF_GetStatusTitle方法的具体用法?PHP CIBlockElement::WF_GetStatusTitle怎么用?PHP CIBlockElement::WF_GetStatusTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIBlockElement
的用法示例。
在下文中一共展示了CIBlockElement::WF_GetStatusTitle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CAdminResult
}
// 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));
$arActions[] = array("SEPARATOR" => true);
$arActions[] = array("ICON" => "delete", "TEXT" => GetMessage('IBLOCK_ADM_HISTORY_DELETE'), "TITLE" => GetMessage("IBLOCK_ADM_HISTORY_DELETE_ALT"), "ACTION" => "if(confirm('" . GetMessageJS("IBLOCK_ADM_HISTORY_CONFIRM_DEL") . "')) " . $lAdmin->ActionDoGroup($f_ID, "delete", 'type=' . htmlspecialcharsbx($type) . '&ELEMENT_ID=' . $ELEMENT_ID . '&IBLOCK_ID=' . $IBLOCK_ID . '&find_section_section=' . $find_section_section));
$arActions[] = array("ICON" => "restore", "TEXT" => GetMessage('IBLOCK_ADM_HISTORY_RESTORE'), "TITLE" => GetMessage("IBLOCK_ADM_HISTORY_RESTORE_ALT"), "ACTION" => "if(confirm('" . GetMessageJS("IBLOCK_ADM_HISTORY_RESTORE_CONFIRM") . "')) " . $lAdmin->ActionDoGroup($f_ID, "restore", 'type=' . htmlspecialcharsbx($type) . '&ELEMENT_ID=' . $ELEMENT_ID . '&IBLOCK_ID=' . $IBLOCK_ID . '&find_section_section=' . $find_section_section));
$row->AddActions($arActions);
}
// footer
$lAdmin->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $rsData->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
// actions buttins
$lAdmin->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE"), "compare" => array("action" => "Diff()", "value" => "compare", "type" => "button", "name" => GetMessage("IBLOCK_ADM_HISTORY_COMPARE"))));
// context menu
$aContext = array(array("TEXT" => GetMessage("IBLOCK_ADM_HISTORY_ORIGINAL"), "LINK" => "iblock_element_edit.php?WF=Y&ID=" . $ELEMENT_ID . "&type=" . htmlspecialcharsbx($type) . "&lang=" . LANG . "&IBLOCK_ID=" . $IBLOCK_ID . "&find_section_section=" . $find_section_section, "TITLE" => GetMessage("IBLOCK_ADM_HISTORY_ORIGINAL_TITLE")));
$lAdmin->AddAdminContextMenu($aContext);
//Chain
示例2: array
"FILE_SIZE" => "Y",
"DIMENSIONS" => "Y",
"IMAGE_POPUP" => "Y",
"MAX_SIZE" => $maxImageSize,
"MIN_SIZE" => $minImageSize,
), array(
'upload' => false,
'medialib' => false,
'file_dialog' => false,
'cloud' => false,
'del' => false,
'description' => false,
)
);
$row->AddViewField("WF_STATUS_ID", htmlspecialcharsbx(CIBlockElement::WF_GetStatusTitle($arRes["WF_STATUS_ID"]))."<input type=hidden name='n".$arRes["ID"]."' value='".CUtil::JSEscape($arRes["NAME"])."'>");
$row->AddViewField("LOCKED_USER_NAME", ' <a href="user_edit.php?lang='.LANGUAGE_ID.'&ID='.$arRes["WF_LOCKED_BY"].'" title="'.GetMessage("IBLOCK_ELSEARCH_USERINFO").'">'.$arRes["LOCKED_USER_NAME"].'</a>');
$arProperties = array();
if(count($arSelectedProps) > 0)
{
$rsProperties = CIBlockElement::GetProperty($IBLOCK_ID, $arRes["ID"]);
while($ar = $rsProperties->GetNext())
{
if(!array_key_exists($ar["ID"], $arProperties))
$arProperties[$ar["ID"]] = array();
$arProperties[$ar["ID"]][$ar["PROPERTY_VALUE_ID"]] = $ar;
}
}
foreach($arSelectedProps as $aProp)
示例3: array
}
$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));
if ($dbPropRes && ($arPropRes = $dbPropRes->GetNext())) {
$arFile = CFile::MakeFileArray($arPropRes["VALUE"]);
$arFile["FILE_SIZE"] = $arFile["size"];
__parse_file_size($arFile, $res);
}
}
$res["~WF_STATUS_TITLE"] = CIBlockElement::WF_GetStatusTitle($res["WF_STATUS_ID"]);
$res["WF_STATUS_TITLE"] = htmlspecialcharsEx($res["~WF_STATUS_TITLE"]);
$res["SHOW"] = array("RESTORE" => CWebDavIblock::CheckRight($arResult["ELEMENT"]["PERMISSION"], "element_delete") > "W" ? "Y" : "N", "DELETE" => CWebDavIblock::CheckRight($arResult["ELEMENT"]["PERMISSION"], "element_delete") > "W" ? "Y" : "N");
if (CWebDavIblock::CheckRight($arResult["ELEMENT"]["PERMISSION"], "element_edit") <= "W") {
if ($arResult["WF_STATUSES_PERMISSION"][$arResult["ELEMENT"]["LAST"]["WF_STATUS_ID"]] >= 2 && $arResult["WF_STATUSES_PERMISSION"][$res["WF_STATUS_ID"]] >= 1) {
$res["SHOW"]["RESTORE"] = "Y";
}
if ($arResult["WF_STATUSES_PERMISSION"][$res["WF_STATUS_ID"]] >= 2) {
$res["SHOW"]["DELETE"] = "Y";
}
}
if ($res["MODIFIED_BY"] > 0) {
if (!array_key_exists($res["MODIFIED_BY"], $arUsersCache)) {
$rsUser = CUser::GetByID($res["MODIFIED_BY"]);
$arUsersCache[$res["MODIFIED_BY"]] = $rsUser->GetNext();
}