src/Eccube/Controller/Admin/Product/CsvImportController.php 1 location
|
@@ 515-524 (lines=10) @@
|
| 512 |
|
$this->entityManager->getConnection()->commit(); |
| 513 |
|
|
| 514 |
|
// 画像ファイルの削除(commit後に削除させる) |
| 515 |
|
foreach ($deleteImages as $images) { |
| 516 |
|
foreach ($images as $image) { |
| 517 |
|
try { |
| 518 |
|
$fs = new Filesystem(); |
| 519 |
|
$fs->remove($this->eccubeConfig['eccube_save_image_dir'].'/'.$image); |
| 520 |
|
} catch (\Exception $e) { |
| 521 |
|
// エラーが発生しても無視する |
| 522 |
|
} |
| 523 |
|
} |
| 524 |
|
} |
| 525 |
|
|
| 526 |
|
log_info('商品CSV登録完了'); |
| 527 |
|
$message = 'admin.common.csv_upload_complete'; |
src/Eccube/Controller/Admin/Product/ProductController.php 1 location
|
@@ 721-728 (lines=8) @@
|
| 718 |
|
$deleteImages = $event->getArgument('deleteImages'); |
| 719 |
|
|
| 720 |
|
// 画像ファイルの削除(commit後に削除させる) |
| 721 |
|
foreach ($deleteImages as $deleteImage) { |
| 722 |
|
try { |
| 723 |
|
$fs = new Filesystem(); |
| 724 |
|
$fs->remove($this->eccubeConfig['eccube_save_image_dir'].'/'.$deleteImage); |
| 725 |
|
} catch (\Exception $e) { |
| 726 |
|
// エラーが発生しても無視する |
| 727 |
|
} |
| 728 |
|
} |
| 729 |
|
|
| 730 |
|
log_info('商品削除完了', [$id]); |
| 731 |
|
|