application/backend/controllers/FormController.php 1 location
|
@@ 262-275 (lines=14) @@
|
| 259 |
|
); |
| 260 |
|
} |
| 261 |
|
|
| 262 |
|
public function actionDelete($id = null) |
| 263 |
|
{ |
| 264 |
|
if ((null === $id) || (null === $model = Form::findOne($id))) { |
| 265 |
|
throw new NotFoundHttpException; |
| 266 |
|
} |
| 267 |
|
|
| 268 |
|
if (!$model->delete()) { |
| 269 |
|
Yii::$app->session->setFlash('error', Yii::t('app', 'Object not removed')); |
| 270 |
|
} else { |
| 271 |
|
Yii::$app->session->setFlash('info', Yii::t('app', 'Object removed')); |
| 272 |
|
} |
| 273 |
|
|
| 274 |
|
return $this->redirect(Url::toRoute('index')); |
| 275 |
|
} |
| 276 |
|
|
| 277 |
|
public function actionRemoveAll() |
| 278 |
|
{ |
application/backend/controllers/ViewController.php 1 location
|
@@ 158-171 (lines=14) @@
|
| 155 |
|
); |
| 156 |
|
} |
| 157 |
|
|
| 158 |
|
public function actionDelete($id = null) |
| 159 |
|
{ |
| 160 |
|
if ((null === $id) || (null === $model = View::findOne($id))) { |
| 161 |
|
throw new NotFoundHttpException; |
| 162 |
|
} |
| 163 |
|
|
| 164 |
|
if (!$model->delete()) { |
| 165 |
|
Yii::$app->session->setFlash('error', Yii::t('app', 'Object not removed')); |
| 166 |
|
} else { |
| 167 |
|
Yii::$app->session->setFlash('info', Yii::t('app', 'Object removed')); |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
return $this->redirect(Url::toRoute('index')); |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
public function actionRemoveAll() |
| 174 |
|
{ |
application/modules/shop/controllers/BackendDiscountController.php 1 location
|
@@ 123-141 (lines=19) @@
|
| 120 |
|
|
| 121 |
|
|
| 122 |
|
|
| 123 |
|
public function actionDelete($id = null) |
| 124 |
|
{ |
| 125 |
|
if ((null === $id) || (null === $model = Discount::findOne($id))) { |
| 126 |
|
throw new NotFoundHttpException; |
| 127 |
|
} |
| 128 |
|
|
| 129 |
|
if (!$model->delete()) { |
| 130 |
|
Yii::$app->session->setFlash('info', Yii::t('app', 'The object is placed in the cart')); |
| 131 |
|
} else { |
| 132 |
|
Yii::$app->session->setFlash('info', Yii::t('app', 'Object removed')); |
| 133 |
|
} |
| 134 |
|
|
| 135 |
|
return $this->redirect( |
| 136 |
|
Yii::$app->request->get( |
| 137 |
|
'returnUrl', |
| 138 |
|
'/shop/backend-discount/index' |
| 139 |
|
) |
| 140 |
|
); |
| 141 |
|
} |
| 142 |
|
|
| 143 |
|
public function actionRemoveAll() |
| 144 |
|
{ |
application/modules/shop/controllers/BackendOrderController.php 1 location
|
@@ 408-427 (lines=20) @@
|
| 405 |
|
]; |
| 406 |
|
} |
| 407 |
|
|
| 408 |
|
public function actionDelete($id = null) |
| 409 |
|
{ |
| 410 |
|
/** @var Order $model */ |
| 411 |
|
if ((null === $id) || (null === $model = Order::findOne($id))) { |
| 412 |
|
throw new NotFoundHttpException; |
| 413 |
|
} |
| 414 |
|
|
| 415 |
|
if (!$model->delete()) { |
| 416 |
|
Yii::$app->session->setFlash('info', Yii::t('app', 'The object is placed in the cart')); |
| 417 |
|
} else { |
| 418 |
|
Yii::$app->session->setFlash('info', Yii::t('app', 'Object removed')); |
| 419 |
|
} |
| 420 |
|
|
| 421 |
|
return $this->redirect( |
| 422 |
|
Yii::$app->request->get( |
| 423 |
|
'returnUrl', |
| 424 |
|
Url::toRoute(['index']) |
| 425 |
|
) |
| 426 |
|
); |
| 427 |
|
} |
| 428 |
|
|
| 429 |
|
public function actionDeleteOrderItem($id) |
| 430 |
|
{ |