| @@ 53-71 (lines=19) @@ | ||
| 50 | ); |
|
| 51 | } |
|
| 52 | ||
| 53 | public function delete(Application $app, Request $request, $id) |
|
| 54 | { |
|
| 55 | $this->isTokenValid($app); |
|
| 56 | ||
| 57 | $Layout = $app['eccube.repository.layout']->find($id); |
|
| 58 | if (!$Layout) { |
|
| 59 | $app->deleteMessage(); |
|
| 60 | ||
| 61 | return $app->redirect($app->url('admin_content_layout')); |
|
| 62 | } |
|
| 63 | ||
| 64 | $app['orm.em']->remove($Layout); |
|
| 65 | $app['orm.em']->flush($Layout); |
|
| 66 | ||
| 67 | ||
| 68 | $app->addSuccess('admin.delete.complete', 'admin'); |
|
| 69 | ||
| 70 | return $app->redirect($app->url('admin_content_layout')); |
|
| 71 | } |
|
| 72 | ||
| 73 | public function edit(Application $app, Request $request, $id = null) |
|
| 74 | { |
|
| @@ 283-299 (lines=17) @@ | ||
| 280 | * @param Application $app |
|
| 281 | * @param $id |
|
| 282 | */ |
|
| 283 | public function uninstall(Application $app, $id) |
|
| 284 | { |
|
| 285 | $this->isTokenValid($app); |
|
| 286 | ||
| 287 | $Plugin = $app['eccube.repository.plugin']->find($id); |
|
| 288 | ||
| 289 | if (!$Plugin) { |
|
| 290 | $app->deleteMessage(); |
|
| 291 | return $app->redirect($app->url('admin_store_plugin')); |
|
| 292 | } |
|
| 293 | ||
| 294 | $app['eccube.service.plugin']->uninstall($Plugin); |
|
| 295 | ||
| 296 | $app->addSuccess('admin.plugin.uninstall.complete', 'admin'); |
|
| 297 | ||
| 298 | return $app->redirect($app->url('admin_store_plugin')); |
|
| 299 | } |
|
| 300 | ||
| 301 | public function handler(Application $app) |
|
| 302 | { |
|