[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/modules/com_vtiger_workflow/ -> VTWorkflowApplication.inc (source)

   1  <?php
   2  /*+**********************************************************************************
   3   * The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9   ************************************************************************************/
  10  class VTWorkflowApplication{
  11  	function __construct($action){
  12          global $_REQUEST;
  13          $this->request;
  14          $this->name = "com_vtiger_workflow";
  15          $this->label = "Workflow";
  16          $this->action = $action;
  17          $this->returnUrl = $_SERVER["REQUEST_URI"];
  18      }
  19      
  20  	function currentUrl(){
  21          // $req = $this->request;
  22          // $url = "index.php?module={$this->name}&action={$this->action}";
  23          // if($this->action=='editworkflow'){
  24          //     if(isset($req['workflow_id'])){
  25          //         $url.="&workflow_id=".$req['workflow_id'];
  26          //     }
  27          // }else if($this->action=='edittask'){
  28          //     if(isset($req['task_id'])){
  29          //         $url.="&task_id=".$req['task_id'];
  30          //     }
  31          // }
  32          return $_SERVER["REQUEST_URI"];            
  33      }
  34      
  35  	function returnUrl(){
  36          return $this->returnUrl;
  37      }
  38      
  39  	function listViewUrl(){
  40          return "index.php?module={$this->name}&action=workflowlist";
  41      }
  42      
  43  	function editWorkflowUrl($id=null){
  44          if($id!=null){
  45              $idPart="&workflow_id=$id";
  46          }
  47          return "index.php?module={$this->name}&action=editworkflow$idPart&return_url=".urlencode($this->returnUrl());
  48      }
  49      
  50  	function deleteWorkflowUrl($id){
  51          $idPart="&workflow_id=$id";
  52          return "index.php?module={$this->name}&action=deleteworkflow$idPart&return_url=".urlencode($this->returnUrl());
  53      }
  54      
  55  	function editTaskUrl($id=null){
  56          if($id!=null){
  57              $idPart="&task_id=$id";
  58          }
  59          return "index.php?module={$this->name}&action=edittask$idPart&return_url=".urlencode($this->returnUrl());
  60      }
  61      
  62  	function deleteTaskUrl($id){
  63          $idPart="&task_id=$id";
  64          return "index.php?module={$this->name}&action=deletetask$idPart&return_url=".urlencode($this->returnUrl());
  65      }
  66  
  67  	function setReturnUrl($returnUrl){
  68          $this->returnUrl = $returnUrl;
  69      }
  70  
  71  	function errorPageUrl($message){
  72          return "index.php?module={$this->name}&action=errormessage&message=".urlencode($message);
  73      }
  74  }
  75  ?>


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1