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


PHP Workflow::getStageCommentRequirements方法代码示例

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


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

示例1:

 * You can contact X2Engine, Inc. P.O. Box 66752, Scotts Valley,
 * California 95067, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2Engine".
 *****************************************************************************************/
/**
 * Used by inline workflow widget to render the funnel 
 */
if (AuxLib::isIE8()) {
    Yii::app()->clientScript->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/excanvas.js');
}
if ($this->id !== 'Workflow') {
    $assetsUrl = Yii::app()->assetManager->publish(Yii::getPathOfAlias('application.modules.workflow.assets'), false, -1, YII_DEBUG ? true : null);
} else {
    $assetsUrl = $this->module->assetsUrl;
}
Yii::app()->clientScript->registerScriptFile($assetsUrl . '/js/X2Geometry.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile($assetsUrl . '/js/BaseFunnel.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile($assetsUrl . '/js/InlineFunnel.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScript('_funnelJS', "\n\nx2.inlineFunnel = new x2.InlineFunnel ({\n    workflowStatus: " . CJSON::encode($workflowStatus) . ",\n    translations: " . CJSON::encode(array('Completed' => Yii::t('workflow', 'Completed'), 'Started' => Yii::t('workflow', 'Started'), 'Details' => Yii::t('workflow', 'Details'), 'Revert Stage' => Yii::t('workflow', 'Revert Stage'), 'Complete Stage' => Yii::t('workflow', 'Complete Stage'), 'Start' => Yii::t('workflow', 'Start'), 'noRevertPermissions' => Yii::t('workflow', 'You do not have permission to revert this stage.'), 'noCompletePermissions' => Yii::t('workflow', 'You do not have permission to complete this stage.'))) . ",\n    stageCount: " . $stageCount . ",\n    containerSelector: '#funnel-container',\n    colors: " . CJSON::encode($colors) . ",\n    revertButtonUrl: '" . Yii::app()->theme->getBaseUrl() . "/images/icons/Uncomplete.png',\n    completeButtonUrl: '" . Yii::app()->theme->getBaseUrl() . "/images/icons/Complete.png',\n    stageNames: " . CJSON::encode(Workflow::getStageNames($workflowStatus)) . ",\n    stagePermissions: " . CJSON::encode(Workflow::getStagePermissions($workflowStatus)) . ",\n    uncompletionPermissions: " . CJSON::encode(Workflow::getStageUncompletionPermissions($workflowStatus)) . ",\n    stagesWhichRequireComments: " . CJSON::encode(Workflow::getStageCommentRequirements($workflowStatus)) . "\n});\n\n", CClientScript::POS_END);
?>
<div id='funnel-container'></div>
开发者ID:tymiles003,项目名称:X2CRM,代码行数:30,代码来源:_inlineFunnel.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: checkCommentRequirements

 /**
  * @param int $stageA
  * @param int $stageB
  * @param array $workflowStatus
  * @param array $comments Comments indexed by stage number
  * @return bool true if comments array has a comment for each stage which requires a comment
  *  in the range [$stageA, $stageB]
  */
 private static function checkCommentRequirements($stageA, $stageB = null, $workflowStatus, $comments)
 {
     $stagesWhichRequireComments = Workflow::getStageCommentRequirements($workflowStatus);
     $commentRequirementsMet = true;
     if ($stageB === null) {
         return !$stagesWhichRequireComments[$stageA - 1] || isset($comments[$stageA]) && !empty($comments[$stageA]);
     }
     for ($i = $stageA - 1; $i < $stageB - 1; ++$i) {
         $commentRequirementsMet &= !$stagesWhichRequireComments[$i] || isset($comments[$i + 1]) && !empty($comments[$i + 1]);
     }
     return $commentRequirementsMet;
 }
开发者ID:keyeMyria,项目名称:CRM,代码行数:20,代码来源:Workflow.php

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