当前位置: 首页>>代码示例>>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;未经允许,请勿转载。