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


PHP eZWorkflow::fetchLimited方法代碼示例

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


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

示例1: fetchAllowedWorkflows

 function fetchAllowedWorkflows()
 {
     $connectionType = '*';
     if ($this->attribute('connect_type') == 'b') {
         $connectionType = 'before';
     } else {
         if ($this->attribute('connect_type') == 'a') {
             $connectionType = 'after';
         }
     }
     return eZWorkflow::fetchLimited($this->attribute('module_name'), $this->attribute('function_name'), $connectionType);
 }
開發者ID:CG77,項目名稱:ezpublish-legacy,代碼行數:12,代碼來源:eztrigger.php

示例2: explode

    $explodedOperation = explode('_', $operation);
    $i = 0;
    if (sizeof($explodedOperation) >= 3) {
        if (strcmp($explodedOperation[$i], "before") == 0 || strcmp($explodedOperation[$i], "after") == 0) {
            $moduleParts = array($explodedOperation[$i++]);
        }
    } else {
        $moduleParts = array("before", "after");
    }
    foreach ($moduleParts as $trigger['connect_type']) {
        $trigger['module'] = $explodedOperation[$i];
        // $i is either 0 or 1
        $trigger['operation'] = $explodedOperation[$i + 1];
        $trigger['workflow_id'] = 0;
        $trigger['key'] = $trigger['module'] . '_' . $trigger['operation'] . '_' . $trigger['connect_type'][0];
        $trigger['allowed_workflows'] = eZWorkflow::fetchLimited($trigger['module'], $trigger['operation'], $trigger['connect_type']);
        foreach ($triggers as $existendTrigger) {
            if ($existendTrigger->attribute('module_name') == $trigger['module'] && $existendTrigger->attribute('function_name') == $trigger['operation'] && $existendTrigger->attribute('connect_type') == $trigger['connect_type'][0]) {
                $trigger['workflow_id'] = $existendTrigger->attribute('workflow_id');
            }
        }
        $possibleTriggers[] = $trigger;
    }
}
if ($http->hasPostVariable('StoreButton')) {
    $db = eZDB::instance();
    $db->begin();
    foreach ($possibleTriggers as $trigger) {
        if ($http->hasPostVariable('WorkflowID_' . $trigger['key'])) {
            $workflowID = $http->postVariable('WorkflowID_' . $trigger['key']);
            if ($workflowID != -1) {
開發者ID:nfrp,項目名稱:ezpublish,代碼行數:31,代碼來源:list.php


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