Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ConfigurationsTable extends Table {
- // deleting threaded records
- private function _deleteChildren($parentId) {
- $children = $this->find('all', [
- 'conditions' => [
- 'parent_id' => $parentId
- ]
- ]);
- if (!empty($children)) {
- foreach ($children as $child) {
- $this->delete($child['id']);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement