public function afterDelete() { parent::afterDelete(); ProductFieldByCatalog::model()->deleteAll('fid=' . $this->id); }
/** * 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); }