|
@@ 471-474 (lines=4) @@
|
| 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); |
| 474 |
|
} |
| 475 |
|
|
| 476 |
|
} |
| 477 |
|
|
|
@@ 509-512 (lines=4) @@
|
| 506 |
|
$Category->setLevel(1); |
| 507 |
|
} |
| 508 |
|
|
| 509 |
|
if ($app['config']['category_nest_level'] < $Category->getLevel()) { |
| 510 |
|
$this->addErrors(($data->key() + 1) . '行目のカテゴリが最大レベルを超えているため設定できません。'); |
| 511 |
|
return $this->render($app, $form, $headers, $this->categoryTwig); |
| 512 |
|
} |
| 513 |
|
|
| 514 |
|
$status = $app['eccube.repository.category']->save($Category); |
| 515 |
|
|
|
@@ 462-465 (lines=4) @@
|
| 459 |
|
if ($row['カテゴリID'] == '') { |
| 460 |
|
$Category = new Category(); |
| 461 |
|
} else { |
| 462 |
|
if (!preg_match('/^\d+$/', $row['カテゴリID'])) { |
| 463 |
|
$this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
| 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が存在しません。'); |
|
@@ 487-490 (lines=4) @@
|
| 484 |
|
|
| 485 |
|
if ($row['親カテゴリID'] != '') { |
| 486 |
|
|
| 487 |
|
if (!preg_match('/^\d+$/', $row['親カテゴリID'])) { |
| 488 |
|
$this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。'); |
| 489 |
|
return $this->render($app, $form, $headers, $this->categoryTwig); |
| 490 |
|
} |
| 491 |
|
|
| 492 |
|
$ParentCategory = $app['eccube.repository.category']->find($row['親カテゴリID']); |
| 493 |
|
if (!$ParentCategory) { |