| @@ 143-165 (lines=23) @@ | ||
| 140 | ||
| 141 | } |
|
| 142 | ||
| 143 | public function up(Application $app, Request $request, $id) |
|
| 144 | { |
|
| 145 | $this->isTokenValid($app); |
|
| 146 | ||
| 147 | $TargetMember = $app['eccube.repository.member']->find($id); |
|
| 148 | ||
| 149 | if (!$TargetMember) { |
|
| 150 | throw new NotFoundHttpException(); |
|
| 151 | } |
|
| 152 | ||
| 153 | $status = false; |
|
| 154 | if ('PUT' === $request->getMethod()) { |
|
| 155 | $status = $app['eccube.repository.member']->up($TargetMember); |
|
| 156 | } |
|
| 157 | ||
| 158 | if ($status) { |
|
| 159 | $app->addSuccess('admin.member.up.complete', 'admin'); |
|
| 160 | } else { |
|
| 161 | $app->addError('admin.member.up.error', 'admin'); |
|
| 162 | } |
|
| 163 | ||
| 164 | return $app->redirect($app->url('admin_setting_system_member')); |
|
| 165 | } |
|
| 166 | ||
| 167 | public function down(Application $app, Request $request, $id) |
|
| 168 | { |
|
| @@ 167-189 (lines=23) @@ | ||
| 164 | return $app->redirect($app->url('admin_setting_system_member')); |
|
| 165 | } |
|
| 166 | ||
| 167 | public function down(Application $app, Request $request, $id) |
|
| 168 | { |
|
| 169 | $this->isTokenValid($app); |
|
| 170 | ||
| 171 | $TargetMember = $app['eccube.repository.member']->find($id); |
|
| 172 | ||
| 173 | if (!$TargetMember) { |
|
| 174 | throw new NotFoundHttpException(); |
|
| 175 | } |
|
| 176 | ||
| 177 | $status = false; |
|
| 178 | if ('PUT' === $request->getMethod()) { |
|
| 179 | $status = $app['eccube.repository.member']->down($TargetMember); |
|
| 180 | } |
|
| 181 | ||
| 182 | if ($status) { |
|
| 183 | $app->addSuccess('admin.member.down.complete', 'admin'); |
|
| 184 | } else { |
|
| 185 | $app->addError('admin.member.down.error', 'admin'); |
|
| 186 | } |
|
| 187 | ||
| 188 | return $app->redirect($app->url('admin_setting_system_member')); |
|
| 189 | } |
|
| 190 | ||
| 191 | public function delete(Application $app, Request $request, $id) |
|
| 192 | { |
|