/** * @return string the associated database table name */ public function delete() { if ($this->id >= 16) { //protect all sys docs return parent::delete(); } else { return false; } }
public function delete() { foreach ($this->transactions as $transaction) { $transaction->intCorrelation = 0; $transaction->intType = 0; $transaction->save(); } return parent::delete(); }
public function delete() { foreach ($this->Transactions as $transaction) { $transaction->extCorrelation = 0; $transaction->save(); } foreach ($this->Bankbooks as $bankbook) { $bankbook->extCorrelation = 0; $bankbook->save(); } return parent::delete(); }
public function delete() { $users = User::find()->All(); foreach ($users as $user) { $IncomeMap = UserIncomeMap::findOne(array('user_id' => $user->id, 'itemVatCat_id' => $this->id)); if ($IncomeMap) { //'user_id', 'itemVatCat_id' $IncomeMap->delete(); } } parent::delete(); }
public function delete() { unlink($this->getFullFilePath()); return parent::delete(); }