add reception global word listener,allow delete transactions, allow delete account_state

This commit is contained in:
2015-12-31 15:42:28 +01:00
parent f59eadd8cc
commit 0b58f628ed
13 changed files with 178 additions and 9 deletions

View File

@@ -159,11 +159,26 @@ class TransferController extends Controller
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
$transfer = $this->findModel($id);
$connection = \Yii::$app->db;
$transaction = $connection->beginTransaction();
try {
if ( $transfer->delete() ){
\Yii::$app->session->setFlash( 'success','Tranzakció törölve' );
$transaction->commit();
}else{
throw new \Exception("Failed to save");
}
} catch(Exception $e) {
$transaction->rollback();
\Yii::$app->session->setFlash( 'danger','Tranzakció törlése nem sikerült' );
}
return $this->redirect(['index']);
return $this->redirect(Yii::$app->request->referrer);
}
*/
}