当前位置: 首页>>代码示例>>PHP>>正文


PHP Configurations::saveObject方法代码示例

本文整理汇总了PHP中Configurations::saveObject方法的典型用法代码示例。如果您正苦于以下问题:PHP Configurations::saveObject方法的具体用法?PHP Configurations::saveObject怎么用?PHP Configurations::saveObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Configurations的用法示例。


在下文中一共展示了Configurations::saveObject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete

    /**
     * delete pm table
     *
     * @param string $httpData->rows
     */
    public function delete ($httpData)
    {
        $result = new stdClass();
        $rows = G::json_decode( stripslashes( $httpData->rows ) );
        $errors = '';
        $count = 0;
        $result = new StdClass();

        $tableCasesList = array();
        $conf = new Configurations();
        $confCasesListDraft = $conf->getConfiguration( 'casesList', 'draft');
        $confCasesListPaused = $conf->getConfiguration( 'casesList', 'paused');
        $confCasesListSent = $conf->getConfiguration( 'casesList', 'sent');
        $confCasesListTodo = $conf->getConfiguration( 'casesList', 'todo');
        $confCasesListUnassigned = $conf->getConfiguration( 'casesList', 'unassigned');
        $tableCasesList['draft'] = ($confCasesListDraft != null) ? (isset($confCasesListDraft['PMTable']) ? $confCasesListDraft['PMTable'] : '') : '';
        $tableCasesList['paused'] = ($confCasesListPaused != null) ? (isset($confCasesListPaused['PMTable']) ? $confCasesListPaused['PMTable'] : '') : '';
        $tableCasesList['sent'] = ($confCasesListSent != null) ? (isset($confCasesListSent['PMTable']) ? $confCasesListSent['PMTable'] : '') : '';
        $tableCasesList['todo'] = ($confCasesListTodo != null) ? (isset($confCasesListTodo['PMTable']) ? $confCasesListTodo['PMTable'] : '') : '';
        $tableCasesList['unassigned'] = ($confCasesListUnassigned != null) ? (isset($confCasesListUnassigned['PMTable']) ? $confCasesListUnassigned['PMTable'] : '') : '';

        foreach ($rows as $row) {
            try {
                $at = new AdditionalTables();
                $table = $at->load( $row->id );

                if (! isset( $table )) {
                    require_once 'classes/model/ReportTable.php';
                    $rtOld = new ReportTable();
                    $existReportTableOld = $rtOld->load( $row->id );
                    if (count($existReportTableOld) == 0) {
                        throw new Exception( G::LoadTranslation('ID_TABLE_NOT_EXIST_SKIPPED') );
                    }
                }

                foreach ($tableCasesList as $action => $idTable) {
                    if ($idTable == $row->id) {
                        $conf = new Configurations();
                        $resultJson = $conf->casesListDefaultFieldsAndConfig($action);
                        $conf->saveObject($resultJson, "casesList", $action, "", "", "");
                    }
                }

                if ($row->type == 'CLASSIC') {
                    G::LoadClass( 'reportTables' );
                    $rp = new reportTables();
                    $rp->deleteReportTable( $row->id );
                    $count ++;
                } else {
                    $at->deleteAll( $row->id );
                    $count ++;
                }
            } catch (Exception $e) {
                $tableName = isset( $table['ADD_TAB_NAME'] ) ? $table['ADD_TAB_NAME'] : $row->id;
                $errors .= $e->getMessage() . "\n";
                continue;
            }
        }

        if ($errors == '') {
            $result->success = true;
            $result->message = $count.G::LoadTranslation( 'ID_TABLES_REMOVED_SUCCESSFULLY' );
            G::auditLog("DeletePmtable", "Table Name: ". $table['ADD_TAB_NAME']." Table ID: (".$table['ADD_TAB_UID'].") ");
        } else {
            $result->success = false;
            $result->message = $count. G::LoadTranslation( 'ID_TABLES_REMOVED_WITH_ERRORS' ) .$errors;
        }

        $result->errors = $errors;

        return $result;
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:77,代码来源:pmTablesProxy.php

示例2: Configurations

/* Includes */
G::LoadClass('case');
G::LoadClass('configuration');
// $_GET['l'] has the type of cases list like todo,pause,cancel, all
$conf = new Configurations();
if (!isset($_GET['l'])) {
    $confCasesList = $conf->loadObject('ProcessMaker', 'cases_List', '', $_SESSION['USER_LOGGED'], '');
    if (is_array($confCasesList)) {
        $sTypeList = $confCasesList['sTypeList'];
    } else {
        $sTypeList = 'to_do';
    }
} else {
    $sTypeList = $_GET['l'];
    $confCasesList = array('sTypeList' => $sTypeList);
    $conf->saveObject($confCasesList, 'ProcessMaker', 'cases_List', '', $_SESSION['USER_LOGGED'], '');
}
$sUIDUserLogged = $_SESSION['USER_LOGGED'];
$_SESSION['CASES_MENU_OPTION'] = $sTypeList;
$oCases = new Cases();
/** here we verify if there is a any case with a unpause on this day*/
if ($sTypeList === 'to_do' or $sTypeList === 'draft' or $sTypeList === 'paused') {
    $oCases->ThrowUnpauseDaemon(date('Y-m-d'));
}
/* *
 * Prepare the addtional filters before to show
 * By Erik
 */
$aAdditionalFilter = array();
if (isset($_GET['PROCESS_UID']) and $_GET['PROCESS_UID'] != "0" && $_GET['PROCESS_UID'] != "") {
    $PRO_UID = $_GET['PROCESS_UID'];
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:cases_List.php


注:本文中的Configurations::saveObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。