Esempio n. 1
0
} else {
    $conds['memento_key'] = array('!=', '');
}
$offset = $Params['Offset'];
if (!is_numeric($offset)) {
    $offset = 0;
}
$limitList = array(1 => 10, 2 => 25, 3 => 50, 4 => 100);
$limit = 10;
$limitId = eZPreferences::value('admin_workflow_processlist_limit');
if ($limitId and isset($limitList[$limitId])) {
    $limit = $limitList[$limitId];
}
$viewParameters = array('offset' => $offset);
$plist = eZWorkflowProcess::fetchList($conds, true, $offset, $limit);
$plistCount = eZWorkflowProcess::count(eZWorkflowProcess::definition(), $conds);
$totalProcessCount = 0;
$outList2 = array();
foreach ($plist as $p) {
    $mementoMain = eZOperationMemento::fetchMain($p->attribute('memento_key'));
    $mementoChild = eZOperationMemento::fetchChild($p->attribute('memento_key'));
    if (!$mementoMain or !$mementoChild) {
        continue;
    }
    $mementoMainData = $mementoMain->data();
    $mementoChildData = $mementoChild->data();
    $triggers = eZTrigger::fetchList(array('module_name' => $mementoChildData['module_name'], 'function_name' => $mementoChildData['operation_name'], 'name' => $mementoChildData['name']));
    if (count($triggers) > 0) {
        $trigger = $triggers[0];
        if (is_object($trigger)) {
            $nkey = $trigger->attribute('module_name') . '/' . $trigger->attribute('function_name') . '/' . $trigger->attribute('name');