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