Administrator
/
new_rukzachok-1
Toggle navigation
Sign in
Sign in
Project
Files
Commits
Network
Graphs
Milestones
Issues
0
Merge Requests
0
Labels
Wiki
Download as
Email Patches
Plain Diff
Browse Code ยป
Commit
402f07384ee4d43b996765acc4909c7e17cc1504
Authored by
Karnovsky A
2016-06-07 15:16:18 +0300
1 parent
ee550146
-
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
common/modules/product/models/Category.php
Inline
Side-by-side
common/modules/product/models/Category.php
Wrap text
Show/Hide comments
View file @
402f073
...
...
@@ -202,4 +202,9 @@ class Category extends \yii\db\ActiveRecord
202
202
}
203
203
return false;
204
204
}
205
+
206
+ public function afterDelete()
207
+ {
208
+ ProductCategory::deleteAll(['category_id' => $this->category_id]);
209
+ }
205
210
}
...
...