本文整理汇总了PHP中processMap::getReportTablesCriteria方法的典型用法代码示例。如果您正苦于以下问题:PHP processMap::getReportTablesCriteria方法的具体用法?PHP processMap::getReportTablesCriteria怎么用?PHP processMap::getReportTablesCriteria使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类processMap
的用法示例。
在下文中一共展示了processMap::getReportTablesCriteria方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getList
/**
* get pmtables list
*
* @param string $httpData->start
* @param string $httpData->limit
* @param string $httpData->textFilter
*/
public function getList($httpData)
{
G::LoadClass('configuration');
G::LoadClass('processMap');
G::LoadClass('pmTable');
$configurations = new Configurations();
$processMap = new processMap();
// setting parameters
$config = $configurations->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$env = $configurations->getConfiguration('ENVIRONMENT_SETTINGS', '');
$limit_size = isset($config->pageSize) ? $config['pageSize'] : 20;
$start = isset($httpData->start) ? $httpData->start : 0;
$limit = isset($httpData->limit) ? $httpData->limit : $limit_size;
$filter = isset($httpData->textFilter) ? $httpData->textFilter : '';
$pro_uid = isset($httpData->pro_uid) ? $httpData->pro_uid : null;
if ($pro_uid !== null) {
$process = $pro_uid == '' ? array('not_equal' => $pro_uid) : array('equal' => $pro_uid);
$addTables = AdditionalTables::getAll($start, $limit, $filter, $process);
$c = $processMap->getReportTablesCriteria($pro_uid);
$oDataset = RoutePeer::doSelectRS($c);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$reportTablesOldList = array();
while ($oDataset->next()) {
$reportTablesOldList[] = $oDataset->getRow();
}
$addTables['count'] += count($reportTablesOldList);
foreach ($reportTablesOldList as $i => $oldRepTab) {
$addTables['rows'][] = array('ADD_TAB_UID' => $oldRepTab['REP_TAB_UID'], 'PRO_UID' => $oldRepTab['PRO_UID'], 'DBS_UID' => $oldRepTab['REP_TAB_CONNECTION'] == 'wf' ? 'workflow' : 'rp', 'ADD_TAB_DESCRIPTION' => $oldRepTab['REP_TAB_TITLE'], 'ADD_TAB_NAME' => $oldRepTab['REP_TAB_NAME'], 'ADD_TAB_TYPE' => $oldRepTab['REP_TAB_TYPE'], 'TYPE' => 'CLASSIC');
}
} else {
$addTables = AdditionalTables::getAll($start, $limit, $filter);
}
foreach ($addTables['rows'] as $i => $table) {
try {
$con = Propel::getConnection(pmTable::resolveDbSource($table['DBS_UID']));
$stmt = $con->createStatement();
$rs = $stmt->executeQuery('SELECT COUNT(*) AS NUM_ROWS from ' . $table['ADD_TAB_NAME']);
if ($rs->next()) {
$r = $rs->getRow();
$addTables['rows'][$i]['NUM_ROWS'] = $r['NUM_ROWS'];
} else {
$addTables['rows'][$i]['NUM_ROWS'] = 0;
}
//removing the prefix "PMT" to allow alphabetical order (just in view)
if (substr($addTables['rows'][$i]['ADD_TAB_NAME'], 0, 4) == 'PMT_') {
$addTables['rows'][$i]['ADD_TAB_NAME'] = substr($addTables['rows'][$i]['ADD_TAB_NAME'], 4);
}
} catch (Exception $e) {
$addTables['rows'][$i]['NUM_ROWS'] = G::LoadTranslation('ID_TABLE_NOT_FOUND');
}
}
return $addTables;
}
示例2: Configurations
require_once 'classes/model/AdditionalTables.php';
G::LoadClass('configuration');
G::LoadClass('processMap');
$configigurations = new Configurations();
$oProcessMap = new processMap();
$config = $configigurations->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$env = $configigurations->getConfiguration('ENVIRONMENT_SETTINGS', '');
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
$pro_uid = isset($_REQUEST['pro_uid']) ? $_REQUEST['pro_uid'] : '';
$process = $pro_uid == '' ? array('not_equal' => $pro_uid) : array('equal' => $pro_uid);
$addTab = AdditionalTables::getAll($start, $limit, $filter, $process);
if ($pro_uid != '') {
$c = $oProcessMap->getReportTablesCriteria($pro_uid);
$oDataset = RoutePeer::doSelectRS($c);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$reportTablesOldList = array();
while ($oDataset->next()) {
$reportTablesOldList[] = $oDataset->getRow();
}
$addTab['count'] += count($reportTablesOldList);
foreach ($reportTablesOldList as $i => $oldRepTab) {
$addTab['rows'][] = array('ADD_TAB_UID' => $oldRepTab['REP_TAB_UID'], 'PRO_UID' => $oldRepTab['PRO_UID'], 'ADD_TAB_DESCRIPTION' => $oldRepTab['REP_TAB_TITLE'], 'ADD_TAB_NAME' => $oldRepTab['REP_TAB_NAME'], 'ADD_TAB_TYPE' => $oldRepTab['REP_TAB_TYPE'], 'TYPE' => 'CLASSIC');
}
}
echo G::json_encode($addTab);
break;
case 'updateTag':
require_once 'classes/model/AdditionalTables.php';