當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。