本文整理汇总了PHP中CBPDocument::DeleteWorkflowTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP CBPDocument::DeleteWorkflowTemplate方法的具体用法?PHP CBPDocument::DeleteWorkflowTemplate怎么用?PHP CBPDocument::DeleteWorkflowTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBPDocument
的用法示例。
在下文中一共展示了CBPDocument::DeleteWorkflowTemplate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: LocalRedirect
if (strlen($apply) <= 0) {
if (strlen($_REQUEST["return_url"]) > 0) {
LocalRedirect($_REQUEST["return_url"]);
} else {
LocalRedirect("/bitrix/admin/iblock_admin.php?type=" . $type . "&lang=" . LANG . "&admin=" . ($_REQUEST["admin"] == "Y" ? "Y" : "N"));
}
}
LocalRedirect("/bitrix/admin/iblock_edit.php?type=" . $type . "&tabControl_active_tab=" . urlencode($tabControl_active_tab) . "&lang=" . LANG . "&ID=" . $ID . "&admin=" . ($_REQUEST["admin"] == "Y" ? "Y" : "N") . (strlen($_REQUEST["return_url"]) > 0 ? "&return_url=" . urlencode($_REQUEST["return_url"]) : ""));
}
}
}
$DB->Rollback();
}
if (check_bitrix_sessid() && $_SERVER["REQUEST_METHOD"] === "GET" && intval($_REQUEST["delete_bizproc_template"]) > 0 && $bBizproc && CIBlockRights::UserHasRightTo($ID, $ID, "iblock_edit")) {
$arErrorTmp = array();
CBPDocument::DeleteWorkflowTemplate($_REQUEST["delete_bizproc_template"], array("iblock", "CIBlockDocument", "iblock_" . $ID), $arErrorTmp);
if (count($arErrorTmp) > 0) {
foreach ($arErrorTmp as $e) {
$strWarning .= $e["message"] . "<br />";
}
} else {
LocalRedirect($APPLICATION->GetCurPageParam("", array("delete_bizproc_template", "sessid")));
die;
}
}
if ($ID > 0) {
$APPLICATION->SetTitle(GetMessage("IB_E_EDIT_TITLE", array("#IBLOCK_TYPE#" => $arIBTYPE["NAME"])));
} else {
$APPLICATION->SetTitle(GetMessage("IB_E_NEW_TITLE", array("#IBLOCK_TYPE#" => $arIBTYPE["NAME"])));
}
ClearVars("str_");
示例2: CAdminException
}
}
if (!empty($arError)) {
$e = new CAdminException($arError);
ShowError($e->GetString());
return false;
} elseif ($_REQUEST['action'] == 'create_default') {
CBPDocument::AddDefaultWorkflowTemplates($documentData['DISK']['DOCUMENT_TYPE']);
LocalRedirect($APPLICATION->GetCurPageParam("", array("action", "sessid")));
} elseif ($_REQUEST['action'] == 'delete') {
$arErrorsTmp = array();
foreach ($documentData as $nameModule => $data) {
$dbRes = CBPWorkflowTemplateLoader::GetList(array($by => $order), array("DOCUMENT_TYPE" => $data["DOCUMENT_TYPE"], "ID" => $_REQUEST["ID"]), false, false, array("ID"));
$availabilityTemplate = $dbRes->Fetch();
if (!empty($availabilityTemplate)) {
CBPDocument::DeleteWorkflowTemplate($_REQUEST['ID'], $data["DOCUMENT_TYPE"], $arErrorsTmp);
}
}
if (empty($arErrorsTmp)) {
$url = !empty($_REQUEST["back_url"]) ? $_REQUEST["back_url"] : $APPLICATION->GetCurPageParam("", array("action", "sessid", "ID"));
LocalRedirect($url);
} elseif (!empty($arErrorsTmp)) {
foreach ($arErrorsTmp as $e) {
$arError[] = array("id" => "delete_error", "text" => $e["message"]);
}
$e = new CAdminException($arError);
ShowError($e->GetString());
}
} elseif (strpos($_REQUEST['action'], "autoload_") !== false) {
foreach ($documentData as $nameModule => $data) {
$dbRes = CBPWorkflowTemplateLoader::GetList(array($by => $order), array("DOCUMENT_TYPE" => $data["DOCUMENT_TYPE"], "ID" => $_REQUEST["ID"]), false, false, array("ID", "NAME", "AUTO_EXECUTE"));
示例3: array
if ($arID = $lAdmin->GroupAction()) {
if ($_REQUEST['action_target'] == 'selected') {
$arID = array();
$dbResultList = CBPWorkflowTemplateLoader::GetList(array(), $arFilter, false, false, array("ID"));
while ($arResult = $dbResultList->Fetch()) {
$arID[] = $arResult['ID'];
}
}
foreach ($arID as $ID) {
if (strlen($ID) <= 0) {
continue;
}
switch ($_REQUEST['action']) {
case "delete":
$arErrorsTmp = array();
CBPDocument::DeleteWorkflowTemplate($ID, $documentType, $arErrorsTmp);
if (count($arErrorsTmp) > 0) {
foreach ($arErrorsTmp as $e) {
$lAdmin->AddGroupError($e["message"], $ID);
}
}
break;
}
}
if (empty($lAdmin->arGroupErrors) && !empty($_REQUEST["back_url"])) {
LocalRedirect($_REQUEST["back_url"]);
}
}
$dbResultList = CBPWorkflowTemplateLoader::GetList(array($by => $order), $arFilter, false, false, array("ID", "NAME", "DESCRIPTION", "MODIFIED", "USER_ID", "AUTO_EXECUTE", "USER_NAME", "USER_LAST_NAME", "USER_LOGIN", "ACTIVE"));
$dbResultList = new CAdminResult($dbResultList, $sTableID);
$dbResultList->NavStart();
示例4: array
if (!CBPDocument::CanUserOperateDocumentType(CBPCanUserOperateOperation::CreateWorkflow, $GLOBALS["USER"]->GetID(), $documentType, array("UserGroups" => $arParams["USER_GROUPS"]))) {
$arError[] = array("id" => "access_denied", "text" => GetMessage("BPATT_NO_PERMS"));
}
}
if (!empty($arError)) {
$e = new CAdminException($arError);
ShowError($e->GetString());
return false;
} elseif (!empty($_REQUEST['action']) && !check_bitrix_sessid()) {
} elseif ($_REQUEST['action'] == 'create_default') {
CBPDocument::AddDefaultWorkflowTemplates($documentType);
LocalRedirect($APPLICATION->GetCurPageParam("", array("action", "sessid")));
} elseif ($_REQUEST['ID'] <= 0) {
} elseif ($_REQUEST['action'] == 'delete') {
$arErrorsTmp = array();
CBPDocument::DeleteWorkflowTemplate($_REQUEST['ID'], $documentType, $arErrorsTmp);
if (empty($arErrorsTmp)) {
$url = !empty($_REQUEST["back_url"]) ? $_REQUEST["back_url"] : $APPLICATION->GetCurPageParam("", array("action", "sessid", "ID"));
LocalRedirect($url);
} elseif (!empty($arErrorsTmp)) {
foreach ($arErrorsTmp as $e) {
$arError[] = array("id" => "delete_error", "text" => $e["message"]);
}
$e = new CAdminException($arError);
ShowError($e->GetString());
}
} elseif (strpos($_REQUEST['action'], "autoload_") !== false) {
$db_res = CBPWorkflowTemplateLoader::GetList(array('ID' => 'DESC'), array("DOCUMENT_TYPE" => $documentType, "ID" => $_REQUEST["ID"]), false, false, array("ID", "NAME", "AUTO_EXECUTE"));
if ($db_res && ($res = $db_res->Fetch())) {
$arFields = array("AUTO_EXECUTE" => $res["AUTO_EXECUTE"]);
$tmp = false;