本文整理匯總了PHP中CBPDocument::ShowTaskForm方法的典型用法代碼示例。如果您正苦於以下問題:PHP CBPDocument::ShowTaskForm方法的具體用法?PHP CBPDocument::ShowTaskForm怎麽用?PHP CBPDocument::ShowTaskForm使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CBPDocument
的用法示例。
在下文中一共展示了CBPDocument::ShowTaskForm方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: catch
$showType = 'Success';
} else {
try {
$documentType = $documentService->GetDocumentType($arTask["PARAMETERS"]["DOCUMENT_ID"]);
if (!array_key_exists("BP_AddShowParameterInit_" . $documentType[0] . "_" . $documentType[1] . "_" . $documentType[2], $GLOBALS)) {
$GLOBALS["BP_AddShowParameterInit_" . $documentType[0] . "_" . $documentType[1] . "_" . $documentType[2]] = 1;
CBPDocument::AddShowParameterInit($documentType[0], "only_users", $documentType[2], $documentType[1]);
}
} catch (Exception $e) {
CAdminMessage::ShowMessage(GetMessage('BPAT_NO_STATE'));
$showType = 'Success';
}
}
list($taskForm, $taskFormButtons) = array("", "");
if ($showType != "Success") {
list($taskForm, $taskFormButtons) = CBPDocument::ShowTaskForm($arTask, $userId, "", $_SERVER["REQUEST_METHOD"] == "POST" && $_POST["action"] == "doTask" ? $_REQUEST : null);
}
?>
<form method="post" name="task_delegate" action="<?php
echo GetPagePath(false, true);
?>
">
<input type="hidden" name="action" value="delegate">
<input type="hidden" name="id" value="<?php
echo intval($arTask["ID"]);
?>
">
<input type="hidden" name="workflow_id" value="<?php
echo htmlspecialcharsbx($arTask["WORKFLOW_ID"]);
?>
">
示例2: GetMessage
$context->Show();
$APPLICATION->SetTitle(str_replace("#ID#", $taskId, GetMessage("BPAT_TITLE")));
if (strlen($errorMessage) > 0) {
CAdminMessage::ShowMessage($errorMessage);
}
$runtime = CBPRuntime::GetRuntime();
$runtime->StartRuntime();
$documentService = $runtime->GetService("DocumentService");
$documentType = $documentService->GetDocumentType($arTask["PARAMETERS"]["DOCUMENT_ID"]);
if (!array_key_exists("BP_AddShowParameterInit_" . $documentType[0] . "_" . $documentType[1] . "_" . $documentType[2], $GLOBALS)) {
$GLOBALS["BP_AddShowParameterInit_" . $documentType[0] . "_" . $documentType[1] . "_" . $documentType[2]] = 1;
CBPDocument::AddShowParameterInit($documentType[0], "only_users", $documentType[2], $documentType[1]);
}
list($taskForm, $taskFormButtons) = array("", "");
if ($showType != "Success") {
list($taskForm, $taskFormButtons) = CBPDocument::ShowTaskForm($arTask, $allowAdminAccess ? $userId : $USER->GetID(), "", $_SERVER["REQUEST_METHOD"] == "POST" && $_POST["action"] == "doTask" ? $_REQUEST : null);
}
?>
<form method="post" name="task_form1" action="<?php
echo GetPagePath(false, true);
?>
" enctype="multipart/form-data">
<input type="hidden" name="action" value="doTask">
<input type="hidden" name="id" value="<?php
echo intval($arTask["ID"]);
?>
">
<input type="hidden" name="workflow_id" value="<?php
echo htmlspecialcharsbx($arTask["WORKFLOW_ID"]);
?>
">
示例3: list
}
}
}
}
if (strlen($arResult["FatalErrorMessage"]) <= 0) {
list($taskForm, $taskFormButtons) = array("", "");
if ($arResult["ShowType"] != "Success") {
$runtime = CBPRuntime::GetRuntime();
$runtime->StartRuntime();
$documentService = $runtime->GetService("DocumentService");
$documentType = $documentService->GetDocumentType($arResult["Task"]["PARAMETERS"]["DOCUMENT_ID"]);
if (!array_key_exists("BP_AddShowParameterInit_" . $documentType[0] . "_" . $documentType[1] . "_" . $documentType[2], $GLOBALS)) {
$GLOBALS["BP_AddShowParameterInit_" . $documentType[0] . "_" . $documentType[1] . "_" . $documentType[2]] = 1;
CBPDocument::AddShowParameterInit($documentType[0], "only_users", $documentType[2], $documentType[1]);
}
list($taskForm, $taskFormButtons) = CBPDocument::ShowTaskForm($arResult["Task"], $USER->GetID(), "", $_SERVER["REQUEST_METHOD"] == "POST" && $_POST["action"] == "doTask" ? $_REQUEST : null);
}
$arResult["TaskForm"] = $taskForm;
$arResult["TaskFormButtons"] = $taskFormButtons;
}
$this->IncludeComponentTemplate();
if (strlen($arResult["FatalErrorMessage"]) <= 0) {
if ($arParams["SET_TITLE"] == "Y") {
$APPLICATION->SetTitle(str_replace("#NAME#", $arResult["Task"]["NAME"], GetMessage("BPWC_WTC_PAGE_TITLE")));
}
if ($arParams["SET_NAV_CHAIN"] == "Y") {
$APPLICATION->AddChainItem($arResult["BlockType"]["NAME"], $arResult["PATH_TO_INDEX"]);
$APPLICATION->AddChainItem($arResult["Block"]["NAME"], $arResult["PATH_TO_LIST"]);
$APPLICATION->AddChainItem(str_replace("#NAME#", $arResult["Task"]["NAME"], GetMessage("BPWC_WTC_PAGE_NAV_CHAIN")));
}
} else {
示例4: htmlspecialcharsbx
$arResult['WORKFLOW_TEMPLATE_NAME'] = $arState["TEMPLATE_NAME"];
$runtime = CBPRuntime::GetRuntime();
$runtime->StartRuntime();
$documentService = $runtime->GetService("DocumentService");
$arResult['DOCUMENT_ICON'] = $documentService->getDocumentIcon($arResult['TASK']['PARAMETERS']['DOCUMENT_ID']);
if (empty($arResult['TASK']['DOCUMENT_NAME'])) {
$arResult['TASK']['DOCUMENT_NAME'] = htmlspecialcharsbx($documentService->getDocumentName($arResult['TASK']['PARAMETERS']['DOCUMENT_ID']));
}
if ($arResult["ShowMode"] != "Success") {
try {
$documentType = $documentService->GetDocumentType($arResult["TASK"]["PARAMETERS"]["DOCUMENT_ID"]);
if (!array_key_exists("BP_AddShowParameterInit_" . $documentType[0] . "_" . $documentType[1] . "_" . $documentType[2], $GLOBALS)) {
$GLOBALS["BP_AddShowParameterInit_" . $documentType[0] . "_" . $documentType[1] . "_" . $documentType[2]] = 1;
CBPDocument::AddShowParameterInit($documentType[0], "only_users", $documentType[2], $documentType[1]);
}
// deprecated old style
list($arResult["TaskForm"], $arResult["TaskFormButtons"]) = CBPDocument::ShowTaskForm($arResult["TASK"], $arParams["USER_ID"], "", $_SERVER["REQUEST_METHOD"] == "POST" && $_POST["action"] == "doTask" ? $_REQUEST : null);
// new style
$arResult['TaskControls'] = CBPDocument::getTaskControls($arResult["TASK"]);
} catch (Exception $e) {
ShowError(GetMessage("BPAT_NO_ACCESS"));
return false;
}
}
$this->IncludeComponentTemplate();
if ($arParams["SET_TITLE"] == "Y") {
$APPLICATION->SetTitle(GetMessage("BPAT_TITLE"));
}
if ($arParams["SET_NAV_CHAIN"] == "Y") {
$APPLICATION->AddChainItem(GetMessage("BPAT_TITLE"));
}
示例5: trim
}
if (!$arTask) {
$workflowId = trim($_REQUEST["workflow_id"]);
if (strlen($workflowId) > 0) {
$dbTask = CBPTaskService::GetList(array(), array("WORKFLOW_ID" => $workflowId, "USER_ID" => $USER->GetID()), false, false, array("ID", "WORKFLOW_ID", "ACTIVITY", "ACTIVITY_NAME", "MODIFIED", "OVERDUE_DATE", "NAME", "DESCRIPTION", "PARAMETERS"));
$arTask = $dbTask->GetNext();
}
}
if (!empty($arTask)) {
$arResult["arTask"] = $arTask;
$arResult["showType"] = "Form";
if ($_SERVER["REQUEST_METHOD"] == "POST" && $_POST["action"] == "doTask" && check_bitrix_sessid()) {
$arErrorsTmp = array();
if (CBPDocument::PostTaskForm($arResult["arTask"], $USER->GetID(), $_REQUEST, $arErrorsTmp, $USER->GetFullName())) {
$arResult["showType"] = "Success";
LocalRedirect(CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BIZPROC"], array()));
die;
} else {
foreach ($arErrorsTmp as $e) {
$arResult["ErrorMessage"] .= $e["message"] . ".<br />";
}
}
}
$APPLICATION->SetTitle(str_replace("#ID#", $arParams["TASK_ID"], GetMessage("BPAT_TITLE")));
list($arResult["taskForm"], $arResult["taskFormButtons"]) = array("", "");
if ($arResult["showType"] != "Success") {
list($arResult["taskForm"], $arResult["taskFormButtons"]) = CBPDocument::ShowTaskForm($arResult["arTask"], $USER->GetID());
}
}
}
$this->IncludeComponentTemplate();