當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SearchHelper::getWorkflows方法代碼示例

本文整理匯總了PHP中SearchHelper::getWorkflows方法的典型用法代碼示例。如果您正苦於以下問題:PHP SearchHelper::getWorkflows方法的具體用法?PHP SearchHelper::getWorkflows怎麽用?PHP SearchHelper::getWorkflows使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SearchHelper的用法示例。


在下文中一共展示了SearchHelper::getWorkflows方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: do_guiBuilder

 function do_guiBuilder()
 {
     $this->oPage->setBreadcrumbDetails(_kt("Advanced Search"));
     $this->oPage->title = _kt("Advanced Search");
     $result = array();
     // TODO: need to escape the parameters
     $result['fieldsets'] = SearchHelper::getFieldsets();
     $result['fieldset_str'] = SearchHelper::getJSfieldsetStruct($result['fieldsets']);
     $result['workflows'] = SearchHelper::getWorkflows();
     $result['workflow_str'] = SearchHelper::getJSworkflowStruct($result['workflows']);
     $result['fields'] = SearchHelper::getSearchFields();
     $result['fields_str'] = SearchHelper::getJSfieldsStruct($result['fields']);
     $result['users_str'] = SearchHelper::getJSusersStruct();
     $result['mimetypes_str'] = SearchHelper::getJSmimeTypesStruct();
     $result['documenttypes_str'] = SearchHelper::getJSdocumentTypesStruct();
     $oTemplating =& KTTemplating::getSingleton();
     $oTemplate = $oTemplating->loadTemplate("ktcore/search2/adv_query_builder");
     $aTemplateData = array("context" => $this, 'metainfo' => $result);
     return $oTemplate->render($aTemplateData);
 }
開發者ID:jpbauer,項目名稱:knowledgetree,代碼行數:20,代碼來源:search2.php

示例2: getJSworkflowStruct

 public static function getJSworkflowStruct($workflows = null)
 {
     if (is_null($workflows)) {
         $workflows = SearchHelper::getWorkflows();
     }
     $workflow_str = '[';
     $wo = 0;
     foreach ($workflows as $workflow) {
         if ($wo++ > 0) {
             $workflow_str .= ',';
         }
         $wid = $workflow['id'];
         $name = searchfix($workflow['name']);
         $workflow_str .= "\n\t{id:\"{$wid}\", name: \"{$name}\", states: [ ";
         $result['workflows'][$wid] = $workflow;
         $states = SearchHelper::getWorkflowStates($wid);
         $result['workflows'][$wid]['states'] = array();
         $so = 0;
         foreach ($states as $state) {
             if ($so++ > 0) {
                 $workflow_str .= ',';
             }
             $sid = $state['id'];
             $name = searchfix($state['name']);
             $result['workflows'][$wid]['states'][$sid] = $state;
             $workflow_str .= "\n\t\t{id:\"{$wid}\", name: \"{$name}\"}";
         }
         $workflow_str .= ']}';
     }
     $workflow_str .= ']';
     return $workflow_str;
 }
開發者ID:sfsergey,項目名稱:knowledgetree,代碼行數:32,代碼來源:search.inc.php


注:本文中的SearchHelper::getWorkflows方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。