Beispiel #1
0
 public function exists($ProUid)
 {
     $oPro = ProcessPeer::retrieveByPk($ProUid);
     return is_object($oPro) && get_class($oPro) == 'Process';
 }
Beispiel #2
0
 /**
  * Get Process details
  *
  * @param object $httpData{PRO_UID}
  * @return array
  */
 public function getProcessDetail($httpData)
 {
     require_once 'classes/model/Process.php';
     G::loadClass('tasks');
     $tasks = new Tasks();
     $PRO_UID = $httpData->PRO_UID;
     $process = ProcessPeer::retrieveByPk($PRO_UID);
     $tasksList = $tasks->getAllTasks($PRO_UID);
     $rootNode->id = $process->getProUid();
     $rootNode->type = 'process';
     $rootNode->typeLabel = G::LoadTranslation('ID_PROCESS');
     $rootNode->text = $process->getProTitle();
     $rootNode->leaf = count($tasksList) > 0 ? false : true;
     $rootNode->iconCls = 'ss_sprite ss_application';
     $rootNode->expanded = true;
     foreach ($tasksList as $task) {
         $node = new stdClass();
         $node->id = $task['TAS_UID'];
         $node->type = 'task';
         $node->typeLabel = G::LoadTranslation('ID_TASK');
         $node->text = $task['TAS_TITLE'];
         $node->iconCls = 'ss_sprite ss_layout';
         $node->leaf = true;
         $rootNode->children[] = $node;
     }
     $treeDetail[] = $rootNode;
     return $treeDetail;
 }