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


PHP Content::removeContent方法代码示例

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


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

示例1: remove

 /**
  * Remove the row
  *
  * @param array $aData or string $ProUid
  * @return string
  *
  */
 public function remove($ProUid)
 {
     if (is_array($ProUid)) {
         $ProUid = isset($ProUid['DEP_UID']) ? $ProUid['DEP_UID'] : '';
     }
     try {
         $oCriteria = new Criteria('workflow');
         $oCriteria->addSelectColumn(UsersPeer::USR_UID);
         $oCriteria->add(UsersPeer::DEP_UID, $ProUid, Criteria::EQUAL);
         $oDataset = UsersPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         $aFields = array();
         while ($aRow = $oDataset->getRow()) {
             $aFields['USR_UID'] = $aRow['USR_UID'];
             $aFields['DEP_UID'] = '';
             $oDepto = UsersPeer::retrieveByPk($aFields['USR_UID']);
             if (is_object($oDepto) && get_class($oDepto) == 'UsersPeer') {
                 return true;
             } else {
                 $oDepto = new Users();
                 $oDepto->update($aFields);
             }
             $oDataset->next();
         }
         $oPro = DepartmentPeer::retrieveByPK($ProUid);
         if (!is_null($oPro)) {
             $dptoTitle = $this->Load($oPro->getDepUid());
             Content::removeContent('DEPO_TITLE', '', $oPro->getDepUid());
             Content::removeContent('DEPO_DESCRIPTION', '', $oPro->getDepUid());
             G::auditLog("DeleteDepartament", "Departament Name: " . $dptoTitle['DEPO_TITLE'] . " Departament ID: (" . $oPro->getDepUid() . ") ");
             return $oPro->delete();
         } else {
             throw new Exception("The row '{$ProUid}' in table Group doesn't exist!");
         }
     } catch (Exception $oError) {
         throw $oError;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:46,代码来源:Department.php

示例2: removeRole

 function removeRole($ROL_UID)
 {
     $con = Propel::getConnection(RolesPeer::DATABASE_NAME);
     try {
         $con->begin();
         $this->setRolUid($ROL_UID);
         $rol_name = $this->load($ROL_UID);
         Content::removeContent('ROL_NAME', '', $this->getRolUid());
         $result = $this->delete();
         $con->commit();
         G::auditLog("DeleteRole", "Role Name: " . $rol_name['ROL_NAME'] . " Role UID: (" . $ROL_UID . ") ");
         return $result;
     } catch (exception $e) {
         $con->rollback();
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:17,代码来源:Roles.php

示例3: remove

 public function remove($TriUid)
 {
     $con = Propel::getConnection(TriggersPeer::DATABASE_NAME);
     try {
         $result = false;
         $con->begin();
         $oTri = TriggersPeer::retrieveByPK($TriUid);
         if (!is_null($oTri)) {
             Content::removeContent("TRI_TITLE", "", $TriUid);
             Content::removeContent("TRI_DESCRIPTION", "", $TriUid);
             $result = $oTri->delete();
             $con->commit();
             //Add Audit Log
             G::auditLog("DeleteTrigger", "Trigger Name: " . $oTri->getTriTitle() . ", Trigger Uid: " . $TriUid . ", Description: " . $oTri->getTriDescription());
         }
         return $result;
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:21,代码来源:Triggers.php

示例4: deleteDataBaseConnection

 /**
  * Delete DataBaseConnection
  * @var string $pro_uid. Uid for Process
  * @var string $dbs_uid. Uid for DataBase Connection
  *
  * @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
  * @copyright Colosa - Bolivia
  *
  * @return void
  */
 public function deleteDataBaseConnection($pro_uid, $dbs_uid)
 {
     $pro_uid = $this->validateProUid($pro_uid);
     $dbs_uid = $this->validateDbsUid($dbs_uid, $pro_uid);
     $oDBSource = new DbSource();
     $oContent = new \Content();
     $oDBSource->remove($dbs_uid, $pro_uid);
     $oContent->removeContent('DBS_DESCRIPTION', "", $dbs_uid);
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:19,代码来源:DataBaseConnection.php

示例5: array

     if (strpos($_POST['server'], "\\")) {
         $_POST['port'] = 'none';
     }
     $aData = array('PRO_UID' => $_SESSION['PROCESS'], 'DBS_TYPE' => $_POST['type'], 'DBS_SERVER' => $_POST['server'], 'DBS_DATABASE_NAME' => $_POST['db_name'], 'DBS_USERNAME' => $_POST['user'], 'DBS_PASSWORD' => ($_POST['passwd'] == 'none' ? "" : G::encrypt($_POST['passwd'], $_POST['db_name'])) . "_2NnV3ujj3w", 'DBS_PORT' => $_POST['port'] == 'none' ? "" : $_POST['port'], 'DBS_ENCODE' => $_POST['enc']);
     $newid = $oDBSource->create($aData);
     $sDelimiter = DBAdapter::getStringDelimiter();
     $oContent->addContent('DBS_DESCRIPTION', '', $newid, SYS_LANG, $_POST['desc']);
     break;
 case 'deleteDbConnection':
     try {
         $oDBSource = new DbSource();
         $oContent = new Content();
         $DBS_UID = $_POST['dbs_uid'];
         $PRO_UID = $_SESSION['PROCESS'];
         $oDBSource->remove($DBS_UID, $PRO_UID);
         $oContent->removeContent('DBS_DESCRIPTION', "", $DBS_UID);
         $result->success = true;
         $result->msg = G::LoadTranslation('ID_DBCONNECTION_REMOVED');
     } catch (Exception $e) {
         $result->success = false;
         $result->msg = $e->getMessage();
     }
     print G::json_encode($result);
     break;
 case 'showTestConnection':
     $G_PUBLISH = new Publisher();
     $G_PUBLISH->AddContent('view', 'dbConnections/dbConnections');
     G::RenderPage('publish', 'raw');
     break;
 case 'testConnection':
     sleep(0);
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:dbConnectionsAjax.php

示例6: remove

 public function remove($StgUid)
 {
     $con = Propel::getConnection(StagePeer::DATABASE_NAME);
     try {
         $con->begin();
         $oStage = StagePeer::retrieveByPK($StgUid);
         if (!is_null($oStage)) {
             Content::removeContent('STG_TITLE', '', $this->getStgUid());
             $result = $oStage->delete();
             $con->commit();
         }
         return $result;
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:17,代码来源:Stage.php

示例7: ymlDomain

$t = new lime_test(12, new lime_output_color());
$t->diag('class Content');
$t->isa_ok($obj, 'Content', 'class Content created');
$t->todo('review all combinations of is_utf8 ');
$t->todo('review is_utf8 should be in another class');
//Initialize the global domain (It is optional)
$testDomain = new ymlDomain();
$test = new ContentTest('content.yml', $t, $testDomain);
//check if an row exists,
$test->load('loadContent');
$test->runSingle();
//check if an row exists,
$test->load('deleteContent');
$test->runAll();
$test->load('addContentAcentos');
$test->runSingle();
//add the same row twice, the first time goes good, but the second the class throw an error
$test->load('addContent1');
$test->runSingle();
$test->load('addContentTwice');
$test->runSingle();
$test->load('loadContent');
$test->runSingle();
$obj = new Content();
$res = $obj->addContent('1', '2', '3', 'en', 'language1');
$res = $obj->addContent('1', '2', '3', 'es', 'language2');
$res = $obj->addContent('1', '2', '3', 'pt', 'language3');
$res = $obj->addContent('1', '2', '3', 'fr', 'language4');
$res = $obj->addContent('1', '2', '3', 'it', 'language5');
$res = $obj->removeContent('1', '2', '3');
//$t->can_ok( $res,      'getAppTitle',   'removeContent.' );
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:classContentTest.php

示例8: createDBConnectionsRows

    /**

     * Create DB Connections rows from an array of data

     *

     * @param array $aConnections

     * @return void

     */

    public function createDBConnectionsRows ($aConnections)

    {

        foreach ($aConnections as $sKey => $aRow) {

            $oConnection = new DbSource();

            if ($oConnection->Exists( $aRow['DBS_UID'], $aRow['PRO_UID'] )) {

                $oConnection->remove( $aRow['DBS_UID'], $aRow['PRO_UID'] );

            }

            $oConnection->create( $aRow );



            // Update information in the table of contents

            $oContent = new Content();

            $ConCategory = 'DBS_DESCRIPTION';

            $ConParent = '';

            $ConId = $aRow['DBS_UID'];

            $ConLang = SYS_LANG;

            if ($oContent->Exists( $ConCategory, $ConParent, $ConId, $ConLang )) {

                $oContent->removeContent( $ConCategory, $ConParent, $ConId );

            }

            $oContent->addContent( $ConCategory, $ConParent, $ConId, $ConLang, $aRow['DBS_DESCRIPTION'] );

        }

    } #@!neyek
开发者ID:rrsc,项目名称:processmaker,代码行数:53,代码来源:class.processes.php

示例9: remove

 /**
  * Remove the application document registry
  *
  * @param array $aData
  * @return string
  *
  */
 public function remove($sInpDocUid)
 {
     $oConnection = Propel::getConnection(InputDocumentPeer::DATABASE_NAME);
     try {
         $oInputDocument = InputDocumentPeer::retrieveByPK($sInpDocUid);
         if (!is_null($oInputDocument)) {
             $nameInput = $this->getInpDocTitle();
             $descInput = $this->getInpDocDescription();
             $oConnection->begin();
             Content::removeContent('INP_DOC_TITLE', '', $oInputDocument->getInpDocUid());
             Content::removeContent('INP_DOC_DESCRIPTION', '', $oInputDocument->getInpDocUid());
             $iResult = $oInputDocument->delete();
             $oConnection->commit();
             //Add Audit Log
             $nameInput = $this->getInpDocTitle();
             $descInput = $this->getInpDocDescription();
             G::auditLog("DeleteInputDocument", "Input Document Name: " . $nameInput . ", Input Document Uid: " . $sInpDocUid . ", Description: " . $descInput);
             return $iResult;
         } else {
             throw new Exception('This row doesn\'t exist!');
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:33,代码来源:InputDocument.php

示例10: remove

    /**
     * Remove the Prolication document registry
     *
     * @param array $aData or string $ProUid
     * @return string
     *
     */
    public function remove ($ProUid)
    {
        if (is_array( $ProUid )) {
            $ProUid = (isset( $ProUid['DYN_UID'] ) ? $ProUid['DYN_UID'] : '');
        }
        try {
            $oPro = DynaformPeer::retrieveByPK( $ProUid );
            if (! is_null( $oPro )) {
                $title = $oPro->getDynTitle();
                $type  = $oPro->getDynType(); 
                $description = $oPro->getDynDescription();

                Content::removeContent( 'DYN_TITLE', '', $oPro->getDynUid() );
                Content::removeContent( 'DYN_DESCRIPTION', '', $oPro->getDynUid() );
                $iResult = $oPro->delete();
                
                //Add Audit Log
                G::auditLog("DeleteDynaform", "Dynaform Title: ".$title.", Type: ".$type.", Description: ".$description);

                if (file_exists( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.xml' )) {
                    unlink( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.xml' );
                }
                if (file_exists( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.xml' )) {
                    unlink( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.xml' );
                }
                if (file_exists( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.html' )) {
                    unlink( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.html' );
                }
                if (file_exists( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.html' )) {
                    unlink( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.html' );
                }
                return $iResult;
            } else {
                throw (new Exception( "The row '$ProUid' in table Dynaform doesn't exist!" ));
            }
        } catch (Exception $oError) {
            throw ($oError);
        }
    }
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:46,代码来源:Dynaform.php

示例11: remove

 /**
  * Remove the Prolication document registry
  *
  * @param array $aData or string $ProUid
  * @return string
  *
  */
 public function remove($ProUid)
 {
     if (is_array($ProUid)) {
         $ProUid = isset($ProUid['GRP_UID']) ? $ProUid['GRP_UID'] : '';
     }
     try {
         $oPro = GroupwfPeer::retrieveByPK($ProUid);
         if (!is_null($oPro)) {
             Content::removeContent('GRP_TITLE', '', $oPro->getGrpUid());
             Content::removeContent('GRP_DESCRIPTION', '', $oPro->getGrpUid());
             return $oPro->delete();
         } else {
             throw new Exception("The row '{$ProUid}' in table Group doesn't exist!");
         }
     } catch (Exception $oError) {
         throw $oError;
     }
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:25,代码来源:Groupwf.php

示例12: remove

 public function remove($TasUid)
 {
     $oConnection = Propel::getConnection(TaskPeer::DATABASE_NAME);
     try {
         $oTask = TaskPeer::retrieveByPK($TasUid);
         if (!is_null($oTask)) {
             $oConnection->begin();
             Content::removeContent('TAS_TITLE', '', $oTask->getTasUid());
             Content::removeContent('TAS_DESCRIPTION', '', $oTask->getTasUid());
             Content::removeContent('TAS_DEF_TITLE', '', $oTask->getTasUid());
             Content::removeContent('TAS_DEF_DESCRIPTION', '', $oTask->getTasUid());
             Content::removeContent('TAS_DEF_PROC_CODE', '', $oTask->getTasUid());
             Content::removeContent('TAS_DEF_MESSAGE', '', $oTask->getTasUid());
             Content::removeContent('TAS_DEF_SUBJECT_MESSAGE', '', $oTask->getTasUid());
             $iResult = $oTask->delete();
             $oConnection->commit();
             return $iResult;
         } else {
             throw new Exception("The row '" . $TasUid . "' in table TASK doesn't exist!");
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:25,代码来源:Task.php

示例13: remove

    /**
     * Remove the application document registry
     * @param array $aData
     * @return string
     * */
    public function remove($sOutDocUid)
    {
        $oConnection = Propel::getConnection(OutputDocumentPeer::DATABASE_NAME);

        try {
            $oOutputDocument = OutputDocumentPeer::retrieveByPK($sOutDocUid);

            if (!is_null($oOutputDocument)) {
                $oConnection->begin();
                Content::removeContent('OUT_DOC_TITLE', '', $oOutputDocument->getOutDocUid());
                Content::removeContent('OUT_DOC_DESCRIPTION', '', $oOutputDocument->getOutDocUid());
                Content::removeContent('OUT_DOC_FILENAME', '', $oOutputDocument->getOutDocUid());
                Content::removeContent('OUT_DOC_TEMPLATE', '', $oOutputDocument->getOutDocUid());
                $iResult = $oOutputDocument->delete();
                $oConnection->commit();

                //Add Audit Log
                G::auditLog("DeleteOutputDocument", "Output Document Name: " . $oOutputDocument->getOutDocTitle() . ", Output Document Uid: " . $sOutDocUid . ", Description: " . $oOutputDocument->getOutDocDescription() . ", Filename generated: " . $oOutputDocument->getOutDocFilename());

                //Return
                return $iResult;
            } else {
                throw (new Exception('This row doesn\'t exist!'));
            }
        } catch (Exception $oError) {
            $oConnection->rollback();

            throw ($oError);
        }
    }
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:35,代码来源:OutputDocument.php

示例14: remove

 function remove($sUID)
 {
     $oConnection = Propel::getConnection(EventPeer::DATABASE_NAME);
     try {
         $oEvent = EventPeer::retrieveByPK($sUID);
         if (!is_null($oEvent)) {
             /* with the new feature for events, a event can to relate a existing trigger
                      or more of one events can be reusing the same trigger
                      so, in this point we should't to delete the trigger
             
                     $oConnection->begin();
                     $oTrigger = new Triggers();
                     $oAppEvent = new AppEvent();
             
                     $oCriteria = new Criteria('workflow');
                     $oCriteria->clearSelectColumns();
                     $oCriteria->addSelectColumn( AppEventPeer::EVN_UID );
                     $oCriteria->addSelectColumn( EventPeer::TRI_UID );
                     $oCriteria->addSelectColumn( AppEventPeer::APP_UID );
                     $oCriteria->addSelectColumn( AppEventPeer::DEL_INDEX );
                     $oCriteria->add(AppEventPeer::EVN_UID, $sUID );
                     $oCriteria->addJoin(EventPeer::EVN_UID, AppEventPeer::EVN_UID, Criteria::JOIN);
                     $oDataset = AppEventPeer::doSelectRs($oCriteria);
                     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
                     $oDataset->next();
             
                     while ($row = $oDataset->getRow()) {
                       $oTrigger->remove($row['TRI_UID']);
                       $oAppEvent->remove( $row['APP_UID'], $row['DEL_INDEX'], $sUID );
                       $oDataset->next();
                     }*/
             Content::removeContent('EVN_DESCRIPTION', '', $oEvent->getEvnUid());
             $iResult = $oEvent->delete();
             $oConnection->commit();
             return $iResult;
         } else {
             throw new Exception('This row doesn\'t exist!');
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:43,代码来源:Event.php

示例15: delete

 /**
  * Delete Web Entry
  *
  * @param string $webEntryUid Unique id of Web Entry
  *
  * return void
  */
 public function delete($webEntryUid)
 {
     try {
         //Verify data
         $this->throwExceptionIfNotExistsWebEntry($webEntryUid, $this->arrayFieldNameForException["webEntryUid"]);
         //Set variables
         $arrayWebEntryData = $this->getWebEntry($webEntryUid, true);
         //Delete content
         \Content::removeContent("WE_TITLE", "", $webEntryUid);
         \Content::removeContent("WE_DESCRIPTION", "", $webEntryUid);
         //Delete web entry
         $criteria = new \Criteria("workflow");
         $criteria->add(\WebEntryPeer::WE_UID, $webEntryUid);
         $result = \WebEntryPeer::doDelete($criteria);
         //Delete files
         if ($arrayWebEntryData["WE_METHOD"] == "WS") {
             $pathDataPublicProcess = PATH_DATA_PUBLIC . $arrayWebEntryData["PRO_UID"];
             $fileName = str_replace(".php", "", trim($arrayWebEntryData["WE_DATA"]));
             $file = $pathDataPublicProcess . PATH_SEP . $fileName . ".php";
             if (is_file($file) && file_exists($file)) {
                 unlink($file);
                 unlink($pathDataPublicProcess . PATH_SEP . $fileName . "Post.php");
             }
         }
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:35,代码来源:WebEntry.php


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