示例#1
0
 public function afterDelete()
 {
     parent::afterDelete();
     ProductFieldByCatalog::model()->deleteAll('fid=' . $this->id);
 }
示例#2
0
 /**
  * This is invoked after the record is deleted.
  */
 protected function afterDelete()
 {
     parent::afterDelete();
     foreach ($this->child as $child) {
         $child->delete();
     }
     CatalogRelation::model()->deleteAll('cid=' . $this->id);
     if (isset(Yii::app()->cache)) {
         $items = Yii::app()->cache->delete(__CLASS__ . 'Tree');
     }
     ProductFieldByCatalog::model()->deleteAll('cid=' . $this->id);
 }