|
@@ 467-470 (lines=4) @@
|
| 464 |
|
return $this->render($app, $form, $headers, $this->categoryTwig); |
| 465 |
|
} |
| 466 |
|
$Category = $app['eccube.repository.category']->find($row['カテゴリID']); |
| 467 |
|
if (!$Category) { |
| 468 |
|
$this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
| 469 |
|
return $this->render($app, $form, $headers, $this->categoryTwig); |
| 470 |
|
} |
| 471 |
|
if ($row['カテゴリID'] == $row['親カテゴリID']) { |
| 472 |
|
$this->addErrors(($data->key() + 1) . '行目のカテゴリIDと親カテゴリIDが同じです。'); |
| 473 |
|
return $this->render($app, $form, $headers, $this->categoryTwig); |
|
@@ 493-496 (lines=4) @@
|
| 490 |
|
} |
| 491 |
|
|
| 492 |
|
$ParentCategory = $app['eccube.repository.category']->find($row['親カテゴリID']); |
| 493 |
|
if (!$ParentCategory) { |
| 494 |
|
$this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。'); |
| 495 |
|
return $this->render($app, $form, $headers, $this->categoryTwig); |
| 496 |
|
} |
| 497 |
|
|
| 498 |
|
} else { |
| 499 |
|
$ParentCategory = null; |
|
@@ 426-429 (lines=4) @@
|
| 423 |
|
if (!empty($formFile)) { |
| 424 |
|
|
| 425 |
|
$data = $this->getImportData($app, $formFile); |
| 426 |
|
if ($data === false) { |
| 427 |
|
$this->addErrors('CSVのフォーマットが一致しません。'); |
| 428 |
|
return $this->render($app, $form, $headers, $this->categoryTwig); |
| 429 |
|
} |
| 430 |
|
|
| 431 |
|
$keys = array_keys($headers); |
| 432 |
|
$columnHeaders = $data->getColumnHeaders(); |