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


PHP Workflow::getStageValues方法代码示例

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


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

示例1: testGetStageValues

 /**
  * Basic test for get stage values
  */
 public function testGetStageValues()
 {
     $workflow = $this->workflows('workflow2');
     $workflowStatus = Workflow::getWorkflowStatus($workflow->id);
     $contact = $this->contacts('contact935');
     $values = Workflow::getStageValues($workflowStatus, array('start' => 0, 'end' => time(), 'workflowId' => $workflow->id));
     //Workflow only has one contact, and it is in the 4th stage
     $this->assertEquals(0, $values[0]);
     $this->assertEquals(0, $values[1]);
     $this->assertEquals(0, $values[2]);
     $this->assertEquals($contact->dealvalue, $values[3]);
     $workflow = $this->workflows('workflow3');
     $workflowStatus = Workflow::getWorkflowStatus($workflow->id);
     $values = Workflow::getStageValues($workflowStatus, array('start' => 0, 'end' => time(), 'workflowId' => $workflow->id));
     //Non-financial workflow should have null values
     $this->assertNull($values[0]);
     $this->assertNull($values[1]);
     $this->assertNull($values[2]);
     $this->assertNull($values[3]);
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:23,代码来源:WorkflowTest.php

示例2: getDragAndDropViewParams

 private function getDragAndDropViewParams($id, $users = '')
 {
     $model = $this->loadModel($id);
     $modelType = isset($_GET['modelType']) ? self::parseModelType($_GET['modelType']) : '';
     $dateRange = self::getDateRange();
     $expectedCloseDateDateRange = self::getDateRange('expectedCloseDateStart', 'expectedCloseDateEnd', 'expectedCloseDateRange');
     $memberListContainerSelectors = array();
     $stageValues = Workflow::getStageValues($model, $users, $modelType, $dateRange, $expectedCloseDateDateRange);
     $stageCount = count($model->stages);
     for ($i = 1; $i <= $stageCount; $i++) {
         $memberListContainerSelectors[] = '#workflow-stage-' . $i . ' .items';
     }
     $workflowStatus = Workflow::getWorkflowStatus($id);
     $stagePermissions = Workflow::getStagePermissions($workflowStatus);
     $stagesWhichRequireComments = Workflow::getStageCommentRequirements($workflowStatus);
     $stageNames = Workflow::getStageNames($workflowStatus);
     $colors = $model->getWorkflowStageColors($stageCount, true);
     return array('model' => $model, 'modelType' => $modelType, 'dateRange' => $dateRange, 'expectedCloseDateDateRange' => $expectedCloseDateDateRange, 'users' => $users, 'colors' => $colors, 'listItemColors' => Workflow::getPipelineListItemColors($colors), 'memberListContainerSelectors' => $memberListContainerSelectors, 'stagePermissions' => $stagePermissions, 'stagesWhichRequireComments' => $stagesWhichRequireComments, 'stageNames' => $stageNames, 'stageValues' => $stageValues);
 }
开发者ID:shuvro35,项目名称:X2CRM,代码行数:19,代码来源:WorkflowController.php

示例3: getDragAndDropViewParams

 private function getDragAndDropViewParams($id, $users = '')
 {
     $model = $this->loadModel($id);
     if (isset($_GET['modelType'])) {
         $modelType = $_GET['modelType'];
     } elseif (!empty($model->financialModel)) {
         if (X2Model::getModelName($model->financialModel)) {
             $modelType = $model->financialModel;
         } else {
             $modelType = 'contacts';
         }
     } else {
         $modelType = 'contacts';
     }
     $dateRange = self::getDateRange();
     $memberListContainerSelectors = array();
     $stageCount = count($model->stages);
     for ($i = 1; $i <= $stageCount; $i++) {
         $memberListContainerSelectors[] = '#workflow-stage-' . $i . ' .items';
     }
     $workflowStatus = Workflow::getWorkflowStatus($id);
     $stagePermissions = Workflow::getStagePermissions($workflowStatus);
     $stagesWhichRequireComments = Workflow::getStageCommentRequirements($workflowStatus);
     $stageNames = Workflow::getStageNames($workflowStatus);
     $colors = $model->getWorkflowStageColors($stageCount, true);
     $stageCounts = Workflow::getStageCounts($workflowStatus, $dateRange, $users, $modelType);
     $stageValues = Workflow::getStageValues($workflowStatus, $dateRange, $users, $modelType);
     return array('model' => $model, 'modelType' => $modelType, 'dateRange' => $dateRange, 'users' => $users, 'colors' => $colors, 'listItemColors' => Workflow::getPipelineListItemColors($colors), 'memberListContainerSelectors' => $memberListContainerSelectors, 'stagePermissions' => $stagePermissions, 'stagesWhichRequireComments' => $stagesWhichRequireComments, 'stageNames' => $stageNames, 'stageCounts' => $stageCounts, 'stageValues' => $stageValues);
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:29,代码来源:WorkflowController.php


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