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


PHP CActiveRecord::afterDelete方法代码示例

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


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

示例1: afterDelete

    /**
     * @return void
     */
    public function afterDelete()
    {
        // remove Entry relations
        EntryHasTag::model()->deleteAllByAttributes(array('tagId' => $this->id));

        parent::afterDelete();
    }
开发者ID:hersoncruz,项目名称:ppma,代码行数:10,代码来源:Tag.php

示例2: afterDelete

 public function afterDelete()
 {
     if (!$this->orig_id) {
         Yii::app()->db->createCommand("DELETE FROM bookmarks WHERE user_id = :user_id AND book_id = :book_id AND orig_id IS NOT NULL")->execute(array(":user_id" => $this->user_id, ":book_id" => $this->book_id));
     }
     parent::afterDelete();
 }
开发者ID:norayr,项目名称:notabenoid,代码行数:7,代码来源:Bookmark.php

示例3: afterDelete

 protected function afterDelete()
 {
     parent::afterDelete();
     Authassignment::model()->deleteAll("itemname='" . $this->name . "'");
     Authitemchild::model()->deleteAll("parent='" . $this->name . "'");
     Authitemchild::model()->deleteAll("child='" . $this->name . "'");
 }
开发者ID:a707937337,项目名称:bscy,代码行数:7,代码来源:Authitem.php

示例4: afterDelete

 protected function afterDelete()
 {
     parent::afterDelete();
     if ($this->image) {
         $this->image->delete();
     }
 }
开发者ID:mjrouser,项目名称:cityapi,代码行数:7,代码来源:Project.php

示例5: afterDelete

 public function afterDelete()
 {
     // delete dependencies
     ManufacturerToStore::model()->deleteAll("manufacturer_id={$this->cacheId}");
     UrlAlias::model()->deleteAll("query='manufacturer_id={$this->cacheId}'");
     parent::afterDelete();
 }
开发者ID:damnpoet,项目名称:yiicart,代码行数:7,代码来源:Manufacturer.php

示例6: afterDelete

 protected function afterDelete()
 {
     parent::afterDelete();
     @unlink(Helper::mediaPath(Product::UPLOAD_ORIGINAL_IMAGE_PATH . $this->image_path, FRONTEND));
     @unlink(Helper::mediaPath(Product::UPLOAD_LARGE_IMAGE_PATH . $this->image_path, FRONTEND));
     @unlink(Helper::mediaPath(Product::UPLOAD_THUMBNAIL_IMAGE_PATH . $this->image_path, FRONTEND));
 }
开发者ID:kinghinds,项目名称:kingtest2,代码行数:7,代码来源:ProductImage.php

示例7: afterDelete

 protected function afterDelete()
 {
     foreach ($this->networks as $nw) {
         $nw->delete();
     }
     parent::afterDelete();
 }
开发者ID:hit-shappens,项目名称:testapp,代码行数:7,代码来源:User.php

示例8: afterDelete

 public function afterDelete()
 {
     if ($this->fileName && is_file($this->getFilePath())) {
         unlink($this->getFilePath());
     }
     parent::afterDelete();
 }
开发者ID:hit-shappens,项目名称:testapp,代码行数:7,代码来源:TmpUploads.php

示例9: afterDelete

 public function afterDelete()
 {
     parent::afterDelete();
     if ($this->countByAttributes(['event_id' => $this->event_id]) == 0) {
         Events::model()->deleteByPk($this->event_id);
     }
 }
开发者ID:akoch-ov,项目名称:dipstart-development,代码行数:7,代码来源:Moderate.php

示例10: afterDelete

 /**
  * This is invoked after the record is deleted.
  */
 protected function afterDelete()
 {
     parent::afterDelete();
     $this->value->delete();
     Photo::deleteByProduct($this);
     ProductRelation::model()->deleteAll('pid=' . $this->id . ' OR pr_id=' . $this->id);
     CatalogRelation::model()->deleteAll('pr_id=' . $this->id);
 }
开发者ID:boyatomic32,项目名称:yii-cart,代码行数:11,代码来源:Product.php

示例11: afterDelete

 protected function afterDelete()
 {
     parent::afterDelete();
     $file = Yii::getPathOfAlias('webroot') . '/uploads/' . $this->id . '/' . $this->img;
     if (file_exists($file) && !is_dir($file)) {
         unlink($file);
     }
 }
开发者ID:resoul,项目名称:simicom_com_ua,代码行数:8,代码来源:File.php

示例12: afterDelete

 public function afterDelete()
 {
     parent::afterDelete();
     $this->book->n_chapters--;
     $this->book->n_verses -= $this->n_verses;
     $this->book->n_vars -= $this->n_vars;
     $this->book->d_vars -= $this->d_vars;
     $this->book->save(false, array("n_chapters", "n_verses", "n_vars", "d_vars"));
 }
开发者ID:norayr,项目名称:notabenoid,代码行数:9,代码来源:Chapter.php

示例13: afterDelete

 protected function afterDelete()
 {
     if (parent::afterDelete()) {
         $model = EvaQuestionGroups::model('section=:section', [':section' => 'econEvaMethods']);
         $model->method = $this->id;
         $model->setScenario('delete');
         $model->save();
     }
 }
开发者ID:schrapps,项目名称:risksur,代码行数:9,代码来源:EconEvaMethods.php

示例14: afterDelete

 public function afterDelete()
 {
     parent::afterDelete();
     $id = $this->id_usr;
     // delete history
     Yii::app()->db->createCommand("DELETE FROM user_lists_usl WHERE idusr_usl={$id}")->execute();
     Yii::app()->db->createCommand("DELETE FROM user_files_usf WHERE idusr_usf={$id}")->execute();
     Yii::app()->db->createCommand("DELETE FROM permanent_statistics_user_psu WHERE idusr_psu={$id}")->execute();
     Yii::app()->db->createCommand("DELETE FROM external_users_history_euh WHERE idusr_euh={$id}")->execute();
 }
开发者ID:vman747,项目名称:virex,代码行数:10,代码来源:ExternalUser.php

示例15: afterDelete

 public function afterDelete()
 {
     $qrs = $this->qrs;
     if ($qrs) {
         foreach ($qrs as $qr) {
             $qr->delete();
         }
     }
     return parent::afterDelete();
 }
开发者ID:priyranjansingh,项目名称:getleads,代码行数:10,代码来源:User.php


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