|
@@ 13-22 (lines=10) @@
|
| 10 |
|
/** |
| 11 |
|
* @return \Symfony\Component\HttpFoundation\RedirectResponse |
| 12 |
|
*/ |
| 13 |
|
public function lockAction() |
| 14 |
|
{ |
| 15 |
|
$performanceEventId = $this->get('request')->query->get('id'); |
| 16 |
|
$em = $this->getDoctrine()->getManager(); |
| 17 |
|
$swindler = $em->getRepository('AppBundle:Swindler')->find($performanceEventId); |
| 18 |
|
$swindler->setBanned(true); |
| 19 |
|
$em->flush($swindler); |
| 20 |
|
|
| 21 |
|
return new RedirectResponse($this->admin->generateUrl('list')); |
| 22 |
|
} |
| 23 |
|
|
| 24 |
|
/** |
| 25 |
|
* @return \Symfony\Component\HttpFoundation\RedirectResponse |
|
@@ 27-36 (lines=10) @@
|
| 24 |
|
/** |
| 25 |
|
* @return \Symfony\Component\HttpFoundation\RedirectResponse |
| 26 |
|
*/ |
| 27 |
|
public function unlockAction() |
| 28 |
|
{ |
| 29 |
|
$performanceEventId = $this->get('request')->query->get('id'); |
| 30 |
|
$em = $this->getDoctrine()->getManager(); |
| 31 |
|
$swindler = $em->getRepository('AppBundle:Swindler')->find($performanceEventId); |
| 32 |
|
$swindler->setBanned(false); |
| 33 |
|
$em->flush($swindler); |
| 34 |
|
|
| 35 |
|
return new RedirectResponse($this->admin->generateUrl('list')); |
| 36 |
|
} |
| 37 |
|
} |
| 38 |
|
|