diff --git a/src/admin/common/abstract/model.php b/src/admin/common/abstract/model.php index 41829ef..2d891d0 100644 --- a/src/admin/common/abstract/model.php +++ b/src/admin/common/abstract/model.php @@ -310,7 +310,9 @@ abstract class AbstractCommonClubsModel $q->where("id = {$this->id}"); } - // FIXME Add additional filter to remove associations of the object + protected function prepareDelete() + {} + public function delete() { $db = Factory::getDbo(); @@ -322,6 +324,7 @@ abstract class AbstractCommonClubsModel $q->where("id = {$this->id}"); $db->transactionStart(); + $this->prepareDelete(); $db->setQuery($q); $db->execute(); $db->transactionCommit();