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


PHP Process::update方法代码示例

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


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

示例1: saveTitlePosition

 public function saveTitlePosition($sProcessUID = '', $iX = 0, $iY = 0)
 {
     try {
         $oProcess = new Process();
         $aFields = $oProcess->load($sProcessUID);
         $aFields['PRO_UID'] = $sProcessUID;
         $aFields['PRO_TITLE_X'] = $iX;
         $aFields['PRO_TITLE_Y'] = $iY;
         $oProcess->update($aFields);
         return true;
     } catch (Exception $oError) {
         throw $oError;
     }
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:14,代码来源:class.processMap.php

示例2: disablePreviousProcesses

    /**

     * disable all previous process with the parent $sProUid

     *

     * @param $sProUid process uid

     * @return void

     */

    public function disablePreviousProcesses ($sProUid)

    {

        //change status of process

        $oCriteria = new Criteria( 'workflow' );

        $oCriteria->add( ProcessPeer::PRO_PARENT, $sProUid );

        $oDataset = ProcessPeer::doSelectRS( $oCriteria );

        $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );

        $oDataset->next();

        $oProcess = new Process();

        while ($aRow = $oDataset->getRow()) {

            $aRow['PRO_STATUS'] = 'DISABLED';

            $aRow['PRO_UPDATE_DATE'] = 'now';

            $oProcess->update( $aRow );

            $oDataset->next();

        }

    }
开发者ID:rrsc,项目名称:processmaker,代码行数:43,代码来源:class.processes.php

示例3: rand

    //#28
    $t->isa_ok($e, 'Exception', 'update() returns error when PRO_UID is not defined');
    //#29
    //  $t->is ( $e->getMessage(),   "This row doesn't exist!",   "update() This row doesn't exist!" );
    $t->todo(" {$e->getMessage}() This row doesn't exist!  <>  The row '' in table Process doesn't exist! " . " line 171");
}
//update with $fields
$newTitle = 'new title ' . rand(1000, 5000);
$newDescription = 'new Description ' . rand(1000, 5000);
$Fields['PRO_UID'] = $proUid;
$Fields['PRO_TITLE'] = $newTitle;
$Fields['PRO_PARENT'] = rand(1000, 5000);
$Fields['PRO_CREATE_DATE'] = 'now';
try {
    $obj = new Process();
    $res = $obj->update($Fields);
    //#30
    $t->is($res, 1, "update() update 1 row");
    $Fields = $obj->Load($proUid);
    //#26
    $t->is($obj->getproUid(), $proUid, "update() APP_UID = " . $proUid);
    //#27
    $t->is($obj->getProTitle(), $newTitle, "update() getAppTitle");
    //#28
    $t->is($Fields['PRO_TITLE'], $newTitle, "update() PRO_TITLE= " . $newTitle);
    //#29
    $t->is($Fields['PRO_CREATE_DATE'], date('Y-m-d H:i:s'), "update() PRO_CREATE_DATE= " . date('Y-m-d H:i:s'));
} catch (Exception $e) {
    //#14
    $t->isa_ok($e, 'PropelException', 'update() return error ' . $e->getMessage());
    print $e->getMessage();
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:classProcessTest.php


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