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


PHP CAdminList::AddActionSuccessMessage方法代碼示例

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


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

示例1: switch

        if (!isset($ids[0]) || !isset($ids[1]) || strlen($ids[0]) <= 0 || strlen($ids[1]) <= 0) {
            continue;
        }
        $providerId = $ids[0];
        $orderId = $ids[1];
        switch ($request['action_button']) {
            case "add_to_pull":
                $result = \Bitrix\Scale\Provider::addToPullFromOrder($providerId, $orderId);
                if ($result === false || isset($result["error"]) && $result["error"] == 1) {
                    $message = Loc::getMessage("SCALE_ORDER_ADD_PULL_ERROR");
                    if (isset($result["message"])) {
                        $message .= ": \"" . $result["message"] . "\"";
                    }
                    $adminList->AddGroupError($message);
                } else {
                    $adminList->AddActionSuccessMessage(Loc::getMessage("SCALE_ORDER_ADD_PULL_SUCCESS"));
                    try {
                        // add to monitoring
                        $actionUpdateMonitoring = \Bitrix\Scale\ActionsData::getActionObject("MONITORING_UPDATE");
                        $actionUpdateMonitoring->start();
                    } catch (Exception $e) {
                        $adminList->AddGroupError($e->getMessage());
                    }
                }
                break;
        }
    }
}
$ordersList = \Bitrix\Scale\Provider::getOrdersList();
$orders = array();
foreach ($ordersList as $providerId => $providerOrders) {
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:31,代碼來源:order.php

示例2: Array

							else
							{
								$lAdmin->AddGroupError(GetMessage("SOA_PERMS_STATUS_GROUP", Array("#ID#" => $ID, "#STATUS#" => $arStatus["NAME"])), $ID);
							}
						}
					}
					elseif(substr($_REQUEST['action'], 0, strlen("delivery_action_")) == "delivery_action_")
					{
						$actionId = substr($_REQUEST['action'], strlen("delivery_action_"));
						if(strlen($actionId) > 0)
						{
							$arResult = CSaleDeliveryHelper::execHandlerAction($ID, $actionId);

							if($arResult["RESULT"] == "OK")
							{
								$lAdmin->AddActionSuccessMessage(GetMessage("SALE_F_DELIVERY_REQUEST_ORDERN")." ".$ID.". ".GetMessage("SALE_F_DELIVERY_REQUEST_SUCCESS").".", $ID);
							}
							else
							{
								$msg = GetMessage("SALE_F_DELIVERY_REQUEST_ORDERN")." ".$ID.". ".GetMessage("SALE_F_DELIVERY_REQUEST_ERROR").".";

								if(isset($arResult["TEXT"]))
									$msg .= " ( ".$arResult["TEXT"]." ) ";

								$lAdmin->AddGroupError($msg, $ID);
							}
						}
					}

				break;
			}
開發者ID:akniyev,項目名稱:arteva.ru,代碼行數:31,代碼來源:order.php

示例3: while

        while ($arResult = $dbResultList->Fetch()) {
            $arID[] = $arResult['ID'];
        }
    }
    foreach ($arID as $ID) {
        if (strlen($ID) <= 0) {
            continue;
        }
        switch ($_REQUEST['action']) {
            case "delete":
                CBPHistoryService::Delete($ID, $documentId);
                break;
            case "recover":
                try {
                    if (CBPHistoryService::RecoverDocumentFromHistory($ID)) {
                        $lAdmin->AddActionSuccessMessage(GetMessage("BPADH_RECOVERY_SUCCESS"));
                    } else {
                        $lAdmin->AddGroupError(GetMessage("BPADH_RECOVERY_ERROR"), $ID);
                    }
                } catch (Exception $e) {
                    $lAdmin->AddGroupError($e->getMessage(), $ID);
                }
                break;
        }
    }
}
$dbResultList = $history->GetHistoryList(array($by => $order), $arFilter, false, false, array("ID", "DOCUMENT_ID", "NAME", "MODIFIED", "USER_ID", "USER_NAME", "USER_LAST_NAME", "USER_LOGIN", "USER_SECOND_NAME"));
$dbResultList = new CAdminResult($dbResultList, $sTableID);
$dbResultList->NavStart();
$lAdmin->NavText($dbResultList->GetNavPrint(GetMessage("BPADH_TITLE")));
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "ID", "default" => true), array("id" => "NAME", "content" => GetMessage("BPADH_NAME"), "sort" => "NAME", "default" => true), array("id" => "MODIFIED", "content" => GetMessage("BPADH_MODIFIED"), "sort" => "MODIFIED", "default" => true), array("id" => "USER", "content" => GetMessage("BPADH_AUTHOR"), "sort" => "USER_ID", "default" => true)));
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:31,代碼來源:document_history.php


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