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


PHP ContentPeer::doDelete方法代码示例

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


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

示例1: removeContent

 function removeContent($ConCategory, $ConParent, $ConId)
 {
     try {
         $c = new Criteria();
         $c->add(ContentPeer::CON_CATEGORY, $ConCategory);
         $c->add(ContentPeer::CON_PARENT, $ConParent);
         $c->add(ContentPeer::CON_ID, $ConId);
         $result = ContentPeer::doSelectRS($c);
         $result->next();
         $row = $result->getRow();
         while (is_array($row)) {
             ContentPeer::doDelete(array($ConCategory, $ConParent, $ConId, $row[3]));
             $result->next();
             $row = $result->getRow();
         }
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:19,代码来源:Content.php

示例2: delete

 /**
  * Removes this object from datastore and sets delete attribute.
  *
  * @param      Connection $con
  * @return     void
  * @throws     PropelException
  * @see        BaseObject::setDeleted()
  * @see        BaseObject::isDeleted()
  */
 public function delete($con = null)
 {
     if ($this->isDeleted()) {
         throw new PropelException("This object has already been deleted.");
     }
     if ($con === null) {
         $con = Propel::getConnection(ContentPeer::DATABASE_NAME);
     }
     try {
         $con->begin();
         ContentPeer::doDelete($this, $con);
         $this->setDeleted(true);
         $con->commit();
     } catch (PropelException $e) {
         $con->rollback();
         throw $e;
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:27,代码来源:BaseContent.php

示例3: Publisher

$oDataset->next();
$aRow1 = $oDataset->getRow();
if (is_array($aRow1)) {
    $G_PUBLISH = new Publisher();
    $G_MAIN_MENU = 'processmaker';
    $G_ID_MENU_SELECTED = 'SETUP';
    $G_SUB_MENU = 'setup';
    $G_ID_SUB_MENU_SELECTED = 'LANGUAGES';
    //$aMessage['MESSAGE'] = G::LoadTranslation('CANT_DEL_LANGUAGE');//"you can't delete this language is in use";
    //$G_PUBLISH->AddContent('xmlform', 'xmlform', 'setup/showMessage', '', $aMessage );
    //G::RenderPage('publishBlank', 'blank');
    G::SendTemporalMessage('CANT_DEL_LANGUAGE', 'error', 'labels');
    G::header('location: languages');
} else {
    /*the reason why comment it was because when delete some language,we're losing some labels about this language*/
    $oCriteria = new Criteria('workflow');
    $oCriteria->add(ContentPeer::CON_LANG, $_GET['LAN_ID']);
    ContentPeer::doDelete($oCriteria);
    /*
     $oCriteria1 = new Criteria('workflow');
     $oCriteria1->add(LanguagePeer::LAN_ENABLED, 0);
     $oCriteria2 = new Criteria('workflow');
     $oCriteria2->add(LanguagePeer::LAN_ID, $_GET['LAN_ID']);
     LanguagePeer::doUpdate($oCriteria2, $oCriteria1, Propel::getConnection('workflow'));
    */
    $aLanguage['LAN_ID'] = $_GET['LAN_ID'];
    $aLanguage['LAN_ENABLED'] = 0;
    $oLanguage = new Language();
    $oLanguage->update($aLanguage);
    G::header('Location: languages');
}
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:languages_Delete.php

示例4: delete

 /**
  * Removes this object from datastore and sets delete attribute.
  *
  * @param      PropelPDO $con
  * @return     void
  * @throws     PropelException
  * @see        BaseObject::setDeleted()
  * @see        BaseObject::isDeleted()
  */
 public function delete(PropelPDO $con = null)
 {
     if ($this->isDeleted()) {
         throw new PropelException("This object has already been deleted.");
     }
     if ($con === null) {
         $con = Propel::getConnection(ContentPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
     }
     $con->beginTransaction();
     try {
         $ret = $this->preDelete($con);
         // symfony_behaviors behavior
         foreach (sfMixer::getCallables('BaseContent:delete:pre') as $callable) {
             if ($ret = call_user_func($callable, $this, $con)) {
                 return;
             }
         }
         if ($ret) {
             ContentPeer::doDelete($this, $con);
             $this->postDelete($con);
             // symfony_behaviors behavior
             foreach (sfMixer::getCallables('BaseContent:delete:post') as $callable) {
                 call_user_func($callable, $this, $con);
             }
             $this->setDeleted(true);
             $con->commit();
         } else {
             $con->commit();
         }
     } catch (PropelException $e) {
         $con->rollBack();
         throw $e;
     }
 }
开发者ID:Chipusy,项目名称:lkbroker,代码行数:43,代码来源:BaseContent.php


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