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


PHP VTWorkflowManager::getMaxAllowedScheduledWorkflows方法代码示例

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


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

示例1: step1

 public function step1(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $qualifiedModuleName = $request->getModule(false);
     $recordId = $request->get('record');
     if ($recordId) {
         $workflowModel = Settings_Workflows_Record_Model::getInstance($recordId);
         $viewer->assign('RECORDID', $recordId);
         $viewer->assign('MODULE_MODEL', $workflowModel->getModule());
         $viewer->assign('MODE', 'edit');
     } else {
         $workflowModel = Settings_Workflows_Record_Model::getCleanInstance($moduleName);
         $selectedModule = $request->get('source_module');
         if (!empty($selectedModule)) {
             $viewer->assign('SELECTED_MODULE', $selectedModule);
         }
     }
     $db = PearDatabase::getInstance();
     $workflowManager = new VTWorkflowManager($db);
     $viewer->assign('MAX_ALLOWED_SCHEDULED_WORKFLOWS', $workflowManager->getMaxAllowedScheduledWorkflows());
     $viewer->assign('SCHEDULED_WORKFLOW_COUNT', $workflowManager->getScheduledWorkflowsCount());
     $viewer->assign('WORKFLOW_MODEL', $workflowModel);
     $viewer->assign('ALL_MODULES', Settings_Workflows_Module_Model::getSupportedModules());
     $viewer->assign('TRIGGER_TYPES', Settings_Workflows_Module_Model::getTriggerTypes());
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
     $viewer->assign('CURRENT_USER', $currentUser);
     $admin = Users::getActiveAdminUser();
     $viewer->assign('ACTIVE_ADMIN', $admin);
     $viewer->view('Step1.tpl', $qualifiedModuleName);
 }
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:33,代码来源:Edit.php

示例2: vtWorkflowEdit

function vtWorkflowEdit($adb, $request, $requestUrl, $current_language, $app_strings)
{
    global $theme, $current_user;
    $util = new VTWorkflowUtils();
    $image_path = "themes/{$theme}/images/";
    $module = new VTWorkflowApplication("editworkflow");
    $mod = return_module_language($current_language, $module->name);
    if (!$util->checkAdminAccess()) {
        $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']);
        $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']);
        return;
    }
    $smarty = new vtigerCRM_Smarty();
    if ($request['source'] == 'from_template') {
        $tm = new VTWorkflowTemplateManager($adb);
        $template = $tm->retrieveTemplate($request['template_id']);
        $workflow = $tm->createWorkflow($template);
    } else {
        $wfs = new VTWorkflowManager($adb);
        if (isset($request["workflow_id"])) {
            $workflow = $wfs->retrieve($request["workflow_id"]);
        } else {
            $moduleName = $request["module_name"];
            $workflow = $wfs->newWorkflow($moduleName);
        }
        $smarty->assign('ScheduledWorkflowsCount', $wfs->getScheduledWorkflowsCount());
        $smarty->assign('MaxAllowedScheduledWorkflows', $wfs->getMaxAllowedScheduledWorkflows());
        $smarty->assign('schdtime_12h', date('h:ia', strtotime(substr($workflow->schtime, 0, strrpos($workflow->schtime, ':')))));
        $schannualdates = json_decode($workflow->schannualdates);
        if (count($schannualdates) > 0) {
            $schannualdates = DateTimeField::convertToUserFormat($schannualdates[0]);
        } else {
            $schannualdates = '';
        }
        $smarty->assign('schdate', $schannualdates);
        $smarty->assign('selected_days1_31', json_decode($workflow->schdayofmonth));
        $smarty->assign('dayOfWeek', json_decode($workflow->schdayofweek));
    }
    if ($workflow == null) {
        $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NO_WORKFLOW']);
        $util->redirectTo($errorUrl, $mod['LBL_ERROR_NO_WORKFLOW']);
        return;
    }
    $workflow->test = addslashes($workflow->test);
    $tm = new VTTaskManager($adb);
    $tasks = $tm->getTasksForWorkflow($workflow->id);
    $smarty->assign("tasks", $tasks);
    $taskTypes = $tm->getTaskTypes($workflow->moduleName);
    $smarty->assign("taskTypes", $taskTypes);
    $smarty->assign("newTaskReturnUrl", vtlib_purify($requestUrl));
    $dayrange = array();
    for ($d = 1; $d <= 31; $d++) {
        $dayrange[$d] = $d;
    }
    $smarty->assign('days1_31', $dayrange);
    $smarty->assign('wfnexttrigger_time', DateTimeField::convertToUserFormat($workflow->nexttrigger_time));
    $smarty->assign("dateFormat", parse_calendardate($current_user->date_format));
    $smarty->assign("returnUrl", vtlib_purify($request["return_url"]));
    $smarty->assign("APP", $app_strings);
    $smarty->assign("MOD", array_merge(return_module_language($current_language, 'Settings'), return_module_language($current_language, $module->name)));
    $smarty->assign("THEME", $theme);
    $smarty->assign("IMAGE_PATH", $image_path);
    $smarty->assign("MODULE_NAME", $module->label);
    $smarty->assign("PAGE_NAME", $mod['LBL_EDIT_WORKFLOW']);
    $smarty->assign("PAGE_TITLE", $mod['LBL_EDIT_WORKFLOW_TITLE']);
    $smarty->assign("workflow", $workflow);
    $smarty->assign("saveType", isset($workflow->id) ? "edit" : "new");
    $smarty->assign("module", $module);
    $smarty->assign("WORKFLOW_TRIGGER_TYPES_HELP_LINK", WORKFLOW_TRIGGER_TYPES);
    $smarty->display("{$module->name}/EditWorkflow.tpl");
}
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:71,代码来源:editworkflow.php


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