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


PHP CBPWorkflowTemplateLoader::getTemplateConstants方法代碼示例

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


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

示例1: GetConstantTypes

 private function GetConstantTypes()
 {
     $rootActivity = $this->GetRootActivity();
     if (method_exists($rootActivity, 'GetWorkflowTemplateId')) {
         $templateId = $rootActivity->GetWorkflowTemplateId();
         if ($templateId > 0) {
             return CBPWorkflowTemplateLoader::getTemplateConstants($templateId);
         }
     }
     return null;
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:11,代碼來源:activity.php

示例2: array

    if (!$arResult["ELEMENT_FIELDS"] || $arResult["ELEMENT_FIELDS"]["CREATED_BY"] == $GLOBALS["USER"]->GetID()) {
        $arCurrentUserGroups[] = "author";
    }
    $DOCUMENT_TYPE = "iblock_" . $arResult["IBLOCK_ID"];
    CBPDocument::AddShowParameterInit("iblock", "only_users", $DOCUMENT_TYPE);
    $arTab2Fields = array();
    $arTab2Fields[] = array("id" => "BIZPROC_WF_STATUS", "name" => GetMessage("CT_BLEE_BIZPROC_PUBLISHED"), "type" => "label", "value" => $arResult["ELEMENT_FIELDS"]["BP_PUBLISHED"] == "Y" ? GetMessage("MAIN_YES") : GetMessage("MAIN_NO"));
    $bizProcIndex = 0;
    $arDocumentStates = CBPDocument::GetDocumentStates(BizProcDocument::generateDocumentComplexType($arParams["IBLOCK_TYPE_ID"], $arResult["IBLOCK_ID"]), $arResult["ELEMENT_ID"] > 0 ? BizProcDocument::getDocumentComplexId($arParams["IBLOCK_TYPE_ID"], $arResult["ELEMENT_ID"]) : null, "Y");
    $custom_html .= '<input type="hidden" name="stop_bizproc" id="stop_bizproc" value="">';
    $runtime = CBPRuntime::GetRuntime();
    $runtime->StartRuntime();
    $documentService = $runtime->GetService("DocumentService");
    foreach ($arDocumentStates as $arDocumentState) {
        $templateId = intval($arDocumentState["TEMPLATE_ID"]);
        $templateConstants = CBPWorkflowTemplateLoader::getTemplateConstants($templateId);
        if (empty($arDocumentState["TEMPLATE_PARAMETERS"]) && empty($arDocumentState["ID"]) && empty($templateConstants) && !CIBlockRights::UserHasRightTo($arResult["IBLOCK_ID"], $arResult["IBLOCK_ID"], 'iblock_edit')) {
            continue;
        }
        $bizProcIndex++;
        if ($arResult["ELEMENT_ID"] > 0) {
            $canViewWorkflow = CBPDocument::CanUserOperateDocument(CBPCanUserOperateOperation::ViewWorkflow, $GLOBALS["USER"]->GetID(), BizProcDocument::getDocumentComplexId($arParams["IBLOCK_TYPE_ID"], $arResult["ELEMENT_ID"]), array("AllUserGroups" => $arCurrentUserGroups, "DocumentStates" => $arDocumentStates, "WorkflowId" => $arDocumentState["ID"]));
        } else {
            $canViewWorkflow = CBPDocument::CanUserOperateDocumentType(CBPCanUserOperateOperation::StartWorkflow, $GLOBALS["USER"]->GetID(), BizProcDocument::generateDocumentComplexType($arParams["IBLOCK_TYPE_ID"], $arResult["IBLOCK_ID"]), array("sectionId" => intval($arResult["SECTION_ID"]), "AllUserGroups" => $arCurrentUserGroups, "DocumentStates" => $arDocumentStates, "WorkflowId" => $arDocumentState["ID"]));
        }
        if ($canViewWorkflow) {
            $arTab2Fields[] = array("id" => "BIZPROC_TITLE" . $bizProcIndex, "name" => $arDocumentState["TEMPLATE_NAME"], "type" => "section");
            if (strlen($arDocumentState["ID"]) && CIBlockElementRights::UserHasRightTo($arResult["IBLOCK_ID"], $arResult["ELEMENT_ID"], "element_edit") && strlen($arDocumentState["WORKFLOW_STATUS"])) {
                $arTab2Fields[] = array("id" => "BIZPROC_STOP" . $bizProcIndex, "name" => GetMessage("CT_BLEE_BIZPROC_STOP_LABEL"), "type" => "label", "value" => '<a href="javascript:void(0)"
						onclick="BX.Lists[\'' . $jsClass . '\'].completeWorkflow(\'' . $arDocumentState["ID"] . '\',
						\'stop\')">' . GetMessage("CT_BLEE_BIZPROC_STOP") . '</a>');
開發者ID:webgksupport,項目名稱:alpina,代碼行數:31,代碼來源:template.php


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