| @@ 209-226 (lines=18) @@ | ||
| 206 | ||
| 207 | $status = $this->categoryRepository->delete($TargetCategory); |
|
| 208 | ||
| 209 | if ($status === true) { |
|
| 210 | ||
| 211 | log_info('カテゴリ削除完了', array($id)); |
|
| 212 | ||
| 213 | $event = new EventArgs( |
|
| 214 | array( |
|
| 215 | 'Parent' => $Parent, |
|
| 216 | 'TargetCategory' => $TargetCategory, |
|
| 217 | ), |
|
| 218 | $request |
|
| 219 | ); |
|
| 220 | $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_PRODUCT_CATEGORY_DELETE_COMPLETE, $event); |
|
| 221 | ||
| 222 | $app->addSuccess('admin.category.delete.complete', 'admin'); |
|
| 223 | } else { |
|
| 224 | log_info('カテゴリ削除エラー', array($id)); |
|
| 225 | $app->addError('admin.category.delete.error', 'admin'); |
|
| 226 | } |
|
| 227 | ||
| 228 | if ($Parent) { |
|
| 229 | return $app->redirect($app->url('admin_product_category_show', array('parent_id' => $Parent->getId()))); |
|
| @@ 195-217 (lines=23) @@ | ||
| 192 | ->getSingleScalarResult(); |
|
| 193 | if ($num > 0) { |
|
| 194 | $app->addError('admin.class_category.delete.hasproduct', 'admin'); |
|
| 195 | } else { |
|
| 196 | $status = $this->classCategoryRepository->delete($TargetClassCategory); |
|
| 197 | ||
| 198 | if ($status === true) { |
|
| 199 | ||
| 200 | log_info('規格分類削除完了', array($id)); |
|
| 201 | ||
| 202 | $event = new EventArgs( |
|
| 203 | array( |
|
| 204 | 'ClassName' => $ClassName, |
|
| 205 | 'TargetClassCategory' => $TargetClassCategory, |
|
| 206 | ), |
|
| 207 | $request |
|
| 208 | ); |
|
| 209 | $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_PRODUCT_CLASS_CATEGORY_DELETE_COMPLETE, $event); |
|
| 210 | ||
| 211 | $app->addSuccess('admin.class_category.delete.complete', 'admin'); |
|
| 212 | } else { |
|
| 213 | log_info('規格分類削除エラー', array($id)); |
|
| 214 | ||
| 215 | $app->addError('admin.class_category.delete.error', 'admin'); |
|
| 216 | } |
|
| 217 | } |
|
| 218 | ||
| 219 | return $app->redirect($app->url('admin_product_class_category', array('class_name_id' => $ClassName->getId()))); |
|
| 220 | } |
|
| @@ 245-263 (lines=19) @@ | ||
| 242 | ||
| 243 | $status = $this->classCategoryRepository->toggleVisibility($TargetClassCategory); |
|
| 244 | ||
| 245 | if ($status === true) { |
|
| 246 | ||
| 247 | log_info('規格分類表示変更完了', array($id)); |
|
| 248 | ||
| 249 | $event = new EventArgs( |
|
| 250 | array( |
|
| 251 | 'ClassName' => $ClassName, |
|
| 252 | 'TargetClassCategory' => $TargetClassCategory, |
|
| 253 | ), |
|
| 254 | $request |
|
| 255 | ); |
|
| 256 | $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_PRODUCT_CLASS_CATEGORY_DELETE_COMPLETE, $event); |
|
| 257 | ||
| 258 | $app->addSuccess('admin.class_category.delete.complete', 'admin'); |
|
| 259 | } else { |
|
| 260 | log_info('規格分類表示変更エラー', array($id)); |
|
| 261 | ||
| 262 | $app->addError('admin.class_category.delete.error', 'admin'); |
|
| 263 | } |
|
| 264 | ||
| 265 | return $app->redirect($app->url('admin_product_class_category', array('class_name_id' => $ClassName->getId()))); |
|
| 266 | } |
|
| @@ 199-216 (lines=18) @@ | ||
| 196 | ||
| 197 | $status = $this->customerAddressRepository->deleteByCustomerAndId($Customer, $id); |
|
| 198 | ||
| 199 | if ($status) { |
|
| 200 | $event = new EventArgs( |
|
| 201 | array( |
|
| 202 | 'id' => $id, |
|
| 203 | 'Customer' => $Customer, |
|
| 204 | ), $request |
|
| 205 | ); |
|
| 206 | $this->eventDispatcher->dispatch(EccubeEvents::FRONT_MYPAGE_DELIVERY_DELETE_COMPLETE, $event); |
|
| 207 | ||
| 208 | $app->addSuccess('mypage.address.delete.complete'); |
|
| 209 | ||
| 210 | log_info('お届け先削除完了', array($id)); |
|
| 211 | ||
| 212 | } else { |
|
| 213 | $app->addError('mypage.address.delete.failed'); |
|
| 214 | ||
| 215 | log_info('お届け先削除失敗', array($id)); |
|
| 216 | } |
|
| 217 | ||
| 218 | return $app->redirect($app->url('mypage_delivery')); |
|
| 219 | } |
|