@@ 147-162 (lines=16) @@ | ||
144 | * |
|
145 | * @return \Symfony\Component\HttpFoundation\RedirectResponse |
|
146 | */ |
|
147 | public function up(News $News) |
|
148 | { |
|
149 | $this->isTokenValid(); |
|
150 | ||
151 | try { |
|
152 | $this->newsRepository->up($News); |
|
153 | ||
154 | $this->addSuccess('admin.news.up.complete', 'admin'); |
|
155 | } catch (\Exception $e) { |
|
156 | log_error('新着情報表示順更新エラー', [$News->getId(), $e]); |
|
157 | ||
158 | $this->addError('admin.news.up.error', 'admin'); |
|
159 | } |
|
160 | ||
161 | return $this->redirectToRoute('admin_content_news'); |
|
162 | } |
|
163 | ||
164 | /** |
|
165 | * 指定した新着情報の表示順を1つ下げる。 |
|
@@ 174-189 (lines=16) @@ | ||
171 | * |
|
172 | * @return \Symfony\Component\HttpFoundation\RedirectResponse |
|
173 | */ |
|
174 | public function down(News $News) |
|
175 | { |
|
176 | $this->isTokenValid(); |
|
177 | ||
178 | try { |
|
179 | $this->newsRepository->down($News); |
|
180 | ||
181 | $this->addSuccess('admin.news.down.complete', 'admin'); |
|
182 | } catch (\Exception $e) { |
|
183 | log_error('新着情報表示順更新エラー', [$News->getId(), $e]); |
|
184 | ||
185 | $this->addError('admin.news.down.error', 'admin'); |
|
186 | } |
|
187 | ||
188 | return $this->redirectToRoute('admin_content_news'); |
|
189 | } |
|
190 | ||
191 | /** |
|
192 | * 指定した新着情報を削除する。 |
@@ 220-235 (lines=16) @@ | ||
217 | * @Method("PUT") |
|
218 | * @Route("/%eccube_admin_route%/setting/system/member/{id}/up", requirements={"id" = "\d+"}, name="admin_setting_system_member_up") |
|
219 | */ |
|
220 | public function up(Request $request, Member $Member) |
|
221 | { |
|
222 | $this->isTokenValid(); |
|
223 | ||
224 | try { |
|
225 | $this->memberRepository->up($Member); |
|
226 | ||
227 | $this->addSuccess('admin.member.up.complete', 'admin'); |
|
228 | } catch (\Exception $e) { |
|
229 | log_error('メンバー表示順更新エラー', [$Member->getId(), $e]); |
|
230 | ||
231 | $this->addError('admin.member.up.error', 'admin'); |
|
232 | } |
|
233 | ||
234 | return $this->redirectToRoute('admin_setting_system_member'); |
|
235 | } |
|
236 | ||
237 | /** |
|
238 | * @Method("PUT") |
|
@@ 241-256 (lines=16) @@ | ||
238 | * @Method("PUT") |
|
239 | * @Route("/%eccube_admin_route%/setting/system/member/{id}/down", requirements={"id" = "\d+"}, name="admin_setting_system_member_down") |
|
240 | */ |
|
241 | public function down(Request $request, Member $Member) |
|
242 | { |
|
243 | $this->isTokenValid(); |
|
244 | ||
245 | try { |
|
246 | $this->memberRepository->down($Member); |
|
247 | ||
248 | $this->addSuccess('admin.member.down.complete', 'admin'); |
|
249 | } catch (\Exception $e) { |
|
250 | log_error('メンバー表示順更新エラー', [$Member->getId(), $e]); |
|
251 | ||
252 | $this->addError('admin.member.down.error', 'admin'); |
|
253 | } |
|
254 | ||
255 | return $this->redirectToRoute('admin_setting_system_member'); |
|
256 | } |
|
257 | ||
258 | /** |
|
259 | * @Method("DELETE") |