| @@ 194-212 (lines=19) @@ | ||
| 191 | } |
|
| 192 | ||
| 193 | ||
| 194 | public function actionDelete($id) |
|
| 195 | { |
|
| 196 | if (!$model = Warehouse::findOne($id)) { |
|
| 197 | throw new NotFoundHttpException; |
|
| 198 | } |
|
| 199 | ||
| 200 | if (!$model->delete()) { |
|
| 201 | Yii::$app->session->setFlash('info', Yii::t('app', 'Object not removed')); |
|
| 202 | } else { |
|
| 203 | Yii::$app->session->setFlash('info', Yii::t('app', 'Object removed')); |
|
| 204 | } |
|
| 205 | ||
| 206 | return $this->redirect( |
|
| 207 | Yii::$app->request->get( |
|
| 208 | 'returnUrl', |
|
| 209 | '/shop/backend-warehouse/index' |
|
| 210 | ) |
|
| 211 | ); |
|
| 212 | } |
|
| 213 | ||
| 214 | public function actionEditPhone($id, $returnUrl) |
|
| 215 | { |
|
| @@ 247-265 (lines=19) @@ | ||
| 244 | return $this->render('form_edit_email', ['warehouseEmail' => $warehouseEmail]); |
|
| 245 | } |
|
| 246 | ||
| 247 | public function actionDeletePhone($id) |
|
| 248 | { |
|
| 249 | if (!$model = WarehousePhone::findOne($id)) { |
|
| 250 | throw new NotFoundHttpException; |
|
| 251 | } |
|
| 252 | ||
| 253 | if (!$model->delete()) { |
|
| 254 | Yii::$app->session->setFlash('info', Yii::t('app', 'Object not removed')); |
|
| 255 | } else { |
|
| 256 | Yii::$app->session->setFlash('info', Yii::t('app', 'Object removed')); |
|
| 257 | } |
|
| 258 | ||
| 259 | return $this->redirect( |
|
| 260 | Yii::$app->request->get( |
|
| 261 | 'returnUrl', |
|
| 262 | '/shop/backend-warehouse/index' |
|
| 263 | ) |
|
| 264 | ); |
|
| 265 | } |
|
| 266 | ||
| 267 | public function actionDeleteEmail($id) |
|
| 268 | { |
|
| @@ 267-285 (lines=19) @@ | ||
| 264 | ); |
|
| 265 | } |
|
| 266 | ||
| 267 | public function actionDeleteEmail($id) |
|
| 268 | { |
|
| 269 | if (!$model = WarehouseEmail::findOne($id)) { |
|
| 270 | throw new NotFoundHttpException; |
|
| 271 | } |
|
| 272 | ||
| 273 | if (!$model->delete()) { |
|
| 274 | Yii::$app->session->setFlash('info', Yii::t('app', 'Object not removed')); |
|
| 275 | } else { |
|
| 276 | Yii::$app->session->setFlash('info', Yii::t('app', 'Object removed')); |
|
| 277 | } |
|
| 278 | ||
| 279 | return $this->redirect( |
|
| 280 | Yii::$app->request->get( |
|
| 281 | 'returnUrl', |
|
| 282 | '/shop/backend-warehouse/index' |
|
| 283 | ) |
|
| 284 | ); |
|
| 285 | } |
|
| 286 | ||
| 287 | ||
| 288 | public function actionUpdateRemains() |
|