Skip to content

Commit d003851

Browse files
committed
Revert met diff
1 parent a33265c commit d003851

7 files changed

+33
-33
lines changed

lib/controller/AbstractController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static function getSubscribedServices(): array
3838
*/
3939
protected function getDataTableSelection(): array
4040
{
41-
$selection = $this->container->get('request_stack')
41+
$selection = $this->get('request_stack')
4242
->getCurrentRequest()
4343
->request->filter(DataTable::POST_SELECTION, [], FILTER_SANITIZE_STRING);
4444

@@ -52,7 +52,7 @@ protected function getDataTableSelection(): array
5252
protected function tableData($data, $groups = null): GenericDataTableResponse
5353
{
5454
return new GenericDataTableResponse(
55-
$this->container->get('serializer'),
55+
$this->get('serializer'),
5656
$data,
5757
null,
5858
null,

lib/controller/ErrorController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function handleException(
4545
case Response::HTTP_FORBIDDEN:
4646
if ($this->getUser() == null) {
4747
$requestUri = $request->getRequestUri();
48-
$router = $this->container->get('router');
48+
$router = $this->get('router');
4949

5050
$this->saveTargetPath($request->getSession(), 'main', $requestUri);
5151

lib/controller/groepen/AbstractGroepenController.php

+15-16
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
use Symfony\Component\Routing\RouteCollection;
6464
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
6565
use Symfony\Component\Serializer\SerializerInterface;
66-
use Twig\Environment;
6766

6867
/**
6968
* Algemene controller voor groepen.
@@ -83,13 +82,13 @@ abstract class AbstractGroepenController extends AbstractController implements
8382
/** @var GroepLidRepository */
8483
private $groepLidRepository;
8584

86-
public function __construct(protected ManagerRegistry $registry, private Environment $twig)
85+
public function __construct(ManagerRegistry $registry)
8786
{
88-
$this->repository = $this->registry->getRepository($this->getGroepType());
89-
$this->changeLogRepository = $this->registry->getRepository(
87+
$this->repository = $registry->getRepository($this->getGroepType());
88+
$this->changeLogRepository = $registry->getRepository(
9089
ChangeLogEntry::class
9190
);
92-
$this->groepLidRepository = $this->registry->getRepository(GroepLid::class);
91+
$this->groepLidRepository = $registry->getRepository(GroepLid::class);
9392
}
9493

9594
/**
@@ -232,7 +231,7 @@ public function overzicht(Request $request, $soort = null)
232231
);
233232
// controleert rechten bekijken per groep
234233
$body = new GroepenView(
235-
$this->twig,
234+
$this->container->get('twig'),
236235
$this->repository,
237236
$groepen,
238237
$soortEnum,
@@ -260,7 +259,7 @@ public function bekijken($id)
260259
}
261260
// controleert rechten bekijken per groep
262261
$body = new GroepenView(
263-
$this->twig,
262+
$this->container->get('twig'),
264263
$this->repository,
265264
$groepen,
266265
$soort,
@@ -311,7 +310,7 @@ public function pasfotos($id)
311310
if (!$this->isGranted(AbstractGroepVoter::BEKIJKEN, $groep)) {
312311
throw $this->createAccessDeniedException();
313312
}
314-
return new GroepPasfotosView($this->twig, $groep);
313+
return new GroepPasfotosView($this->container->get('twig'), $groep);
315314
}
316315

317316
public function lijst($id)
@@ -320,7 +319,7 @@ public function lijst($id)
320319
if (!$this->isGranted(AbstractGroepVoter::BEKIJKEN, $groep)) {
321320
throw $this->createAccessDeniedException();
322321
}
323-
return new GroepLijstView($this->twig, $groep);
322+
return new GroepLijstView($this->container->get('twig'), $groep);
324323
}
325324

326325
public function stats($id)
@@ -333,7 +332,7 @@ public function stats($id)
333332
$statistieken = $this->repository->getStatistieken($groep);
334333

335334
return new GroepStatistiekView(
336-
$this->twig,
335+
$this->container->get('twig'),
337336
$groep,
338337
$statistieken
339338
);
@@ -345,7 +344,7 @@ public function emails($id)
345344
if (!$this->isGranted(AbstractGroepVoter::BEKIJKEN, $groep)) {
346345
throw $this->createAccessDeniedException();
347346
}
348-
return new GroepEmailsView($this->twig, $groep);
347+
return new GroepEmailsView($this->container->get('twig'), $groep);
349348
}
350349

351350
public function eetwens($id)
@@ -354,7 +353,7 @@ public function eetwens($id)
354353
if (!$this->isGranted(AbstractGroepVoter::BEKIJKEN, $groep)) {
355354
throw $this->createAccessDeniedException();
356355
}
357-
return new GroepEetwensView($this->twig, $groep);
356+
return new GroepEetwensView($this->container->get('twig'), $groep);
358357
}
359358

360359
public function zoeken(Request $request, $zoekterm = null)
@@ -504,7 +503,7 @@ public function aanmaken(Request $request, $id = null, $soort = null)
504503
FlashType::SUCCESS,
505504
$groep::class . ' succesvol aangemaakt!'
506505
);
507-
$form = new GroepPreviewForm($this->twig, $groep);
506+
$form = new GroepPreviewForm($this->container->get('twig'), $groep);
508507
$view->modal = $form->__toString();
509508
return $view;
510509
} else {
@@ -744,7 +743,7 @@ public function voorbeeld($id)
744743
if (!$this->isGranted(AbstractGroepVoter::BEKIJKEN, $groep)) {
745744
throw $this->createAccessDeniedException();
746745
}
747-
return new GroepPreviewForm($this->twig, $groep);
746+
return new GroepPreviewForm($this->container->get('twig'), $groep);
748747
}
749748

750749
/**
@@ -852,7 +851,7 @@ public function ketzer_aanmelden(EntityManagerInterface $em, $id)
852851
$em->persist($lid);
853852
$em->flush();
854853
$groep->getLeden()->add($lid);
855-
return new GroepPasfotosView($this->twig, $groep);
854+
return new GroepPasfotosView($this->container->get('twig'), $groep);
856855
} else {
857856
return $form;
858857
}
@@ -981,7 +980,7 @@ public function ketzer_afmelden(EntityManagerInterface $em, $id, $uid = null)
981980
$em->remove($lid);
982981
$em->flush();
983982

984-
return new GroepView($this->twig, $groep);
983+
return new GroepView($this->container->get('twig'), $groep);
985984
}
986985

987986
public function afmelden(EntityManagerInterface $em, $id, $uid)

lib/controller/groepen/KetzersController.php

+10
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@
2020
*/
2121
class KetzersController extends AbstractGroepenController
2222
{
23+
/**
24+
* @var ManagerRegistry
25+
*/
26+
private $registry;
27+
28+
public function __construct(ManagerRegistry $registry)
29+
{
30+
parent::__construct($registry);
31+
$this->registry = $registry;
32+
}
2333

2434
public function getGroepType()
2535
{

lib/events/AccessControlEventListener.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function onKernelController(ControllerEvent $event)
8787
$this->annotations->getMethodAnnotation(
8888
$reflectionMethod,
8989
IsGranted::class
90-
) || !empty($reflectionMethod->getAttributes(IsGranted::class))
90+
)
9191
) {
9292
return;
9393
}

lib/view/cms/CmsPaginaView.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function getTitel()
4343
public function __toString(): string
4444
{
4545
return (string) ContainerFacade::getContainer()
46-
->get('csr.hack.twig')
46+
->get(Environment::class)
4747
->render('cms/pagina-inhoud.html.twig', [
4848
'pagina' => $this->pagina,
4949
]);

templates/dies2025/dies2025.html.twig

+3-12
Original file line numberDiff line numberDiff line change
@@ -374,18 +374,9 @@
374374
</button>
375375

376376
<div class="collapse" id="collapseFDTD16">
377-
<div class="d-flex row">
378-
<p class="col-md-12">
379-
Na de spannende verticalestrijd zal er een iets minder competitieve activiteit zijn. Dat is natuurlijk niets anders dan een leuke sportclinic! Leer de fijne kneepjes van judo!
380-
</p>
381-
<div class="dies-activiteit-ketzers col-md-12">
382-
<div class="ketzers">
383-
<div class="ketzer">
384-
{{ '[activiteit=12773]' | bbcode }}
385-
</div>
386-
</div>
387-
</div>
388-
</div>
377+
<p class="col-md-12">
378+
Na de spannende verticalestrijd zal er een iets minder competitieve activiteit zijn. Dat is natuurlijk niets anders dan een leuke sportclinic! Leer de fijne kneepjes van een mooie sport die u altijd al een keer heeft willen proberen. De sport voor deze avond is nog een verrassing!
379+
</p>
389380
</div>
390381
</div>
391382
</div>

0 commit comments

Comments
 (0)