当前位置: 首页>>代码示例>>PHP>>正文


PHP CBPWorkflowTemplateLoader::add方法代码示例

本文整理汇总了PHP中CBPWorkflowTemplateLoader::add方法的典型用法代码示例。如果您正苦于以下问题:PHP CBPWorkflowTemplateLoader::add方法的具体用法?PHP CBPWorkflowTemplateLoader::add怎么用?PHP CBPWorkflowTemplateLoader::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBPWorkflowTemplateLoader的用法示例。


在下文中一共展示了CBPWorkflowTemplateLoader::add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processActionSaveAjax

 protected function processActionSaveAjax()
 {
     $this->request->addFilter(new PostDecodeFilter());
     if ($this->request->getQuery('saveuserparams') == 'Y') {
         $serializeValue = serialize($this->request->getPost('USER_PARAMS'));
         if (strlen($serializeValue) > 64000) {
             $response = "\n\t\t\t\t\t<script>\n\t\t\t\t\t\talert('" . Loc::getMessage('BIZPROC_USER_PARAMS_SAVE_ERROR') . "');\n\t\t\t\t\t</script>\n\t\t\t\t";
             $this->sendResponse($response);
         }
         CUserOptions::setOption('~bizprocdesigner', 'activity_settings', $serializeValue);
         $this->getApplication()->restartBuffer();
         $this->end();
     }
     $fields = array('DOCUMENT_TYPE' => $this->arResult['DOCUMENT_COMPLEX_TYPE'], 'AUTO_EXECUTE' => $this->request->getPost('workflowTemplateAutostart'), 'NAME' => $this->request->getPost('workflowTemplateName'), 'DESCRIPTION' => $this->request->getPost('workflowTemplateDescription'), 'TEMPLATE' => $this->request->getPost('arWorkflowTemplate'), 'PARAMETERS' => $this->request->getPost('arWorkflowParameters'), 'VARIABLES' => $this->request->getPost('arWorkflowVariables'), 'CONSTANTS' => $this->request->getPost('arWorkflowConstants'), 'USER_ID' => intval($this->getUser()->getID()), 'MODIFIER_USER' => new CBPWorkflowTemplateUser(CBPWorkflowTemplateUser::CurrentUser));
     if (!is_array($fields["VARIABLES"])) {
         $fields['VARIABLES'] = array();
     }
     if (!is_array($fields["CONSTANTS"])) {
         $fields['CONSTANTS'] = array();
     }
     if ($this->arResult['TEMPLATE'] != $fields['TEMPLATE']) {
         $fields['SYSTEM_CODE'] = '';
     }
     try {
         if ($this->arResult['ID'] > 0) {
             CBPWorkflowTemplateLoader::update($this->arResult['ID'], $fields);
         } else {
             $this->arResult['ID'] = CBPWorkflowTemplateLoader::add($fields);
         }
     } catch (Exception $e) {
         $response = "\n\t\t\t\t<script>\n\t\t\t\t\talert('" . Loc::getMessage('BIZPROC_WFEDIT_SAVE_ERROR') . "\\n " . preg_replace("#\\.\\W?#", ".\\n", AddSlashes(htmlspecialcharsbx($e->getMessage()))) . "');\n\t\t\t\t</script>\n\t\t\t";
         $this->sendResponse($response);
     }
     $response = "\n\t\t\t<script>\n\t\t\t\twindow.location = '" . ($this->request->getQuery('apply') == 'Y' ? str_replace('#ID#', $this->arResult['ID'], $this->arResult['EDIT_PAGE_TEMPLATE']) : CUtil::JSEscape($this->arResult['LIST_PAGE_URL'])) . "';\n\t\t\t</script>\n\t\t";
     $this->sendResponse($response);
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:36,代码来源:class.php


注:本文中的CBPWorkflowTemplateLoader::add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。