| @@ 105-121 (lines=17) @@ | ||
| 102 | * @param $id |
|
| 103 | * @return \Symfony\Component\HttpFoundation\RedirectResponse |
|
| 104 | */ |
|
| 105 | public function delete(Application $app, $id) |
|
| 106 | { |
|
| 107 | $this->isTokenValid($app); |
|
| 108 | ||
| 109 | $TargetTaxRule = $app['eccube.repository.tax_rule']->find($id); |
|
| 110 | if (!$TargetTaxRule) { |
|
| 111 | $app->deleteMessage(); |
|
| 112 | return $app->redirect($app->url('admin_setting_shop_tax')); |
|
| 113 | } |
|
| 114 | ||
| 115 | if (!$TargetTaxRule->isDefaultTaxRule()) { |
|
| 116 | $app['eccube.repository.tax_rule']->delete($TargetTaxRule); |
|
| 117 | $app->addSuccess('admin.shop.tax.delete.complete', 'admin'); |
|
| 118 | } |
|
| 119 | ||
| 120 | return $app->redirect($app->url('admin_setting_shop_tax')); |
|
| 121 | } |
|
| 122 | ||
| 123 | /** |
|
| 124 | * 軽減税率の有効/無効設定 |
|
| @@ 289-305 (lines=17) @@ | ||
| 286 | * @param Application $app |
|
| 287 | * @param $id |
|
| 288 | */ |
|
| 289 | public function uninstall(Application $app, $id) |
|
| 290 | { |
|
| 291 | $this->isTokenValid($app); |
|
| 292 | ||
| 293 | $Plugin = $app['eccube.repository.plugin']->find($id); |
|
| 294 | ||
| 295 | if (!$Plugin) { |
|
| 296 | $app->deleteMessage(); |
|
| 297 | return $app->redirect($app->url('admin_store_plugin')); |
|
| 298 | } |
|
| 299 | ||
| 300 | $app['eccube.service.plugin']->uninstall($Plugin); |
|
| 301 | ||
| 302 | $app->addSuccess('admin.plugin.uninstall.complete', 'admin'); |
|
| 303 | ||
| 304 | return $app->redirect($app->url('admin_store_plugin')); |
|
| 305 | } |
|
| 306 | ||
| 307 | public function handler(Application $app) |
|
| 308 | { |
|