/** * @param Request $request * * @return \Symfony\Component\HttpFoundation\Response */ public function indexAction(Request $request) { $certificationCounter = []; foreach ($this->certificationManager->getCertifications() as $cn => $label) { $certificationCounter[$cn] = ['metrics' => (int) $this->redisClient->get($cn), 'label' => $label, 'icon' => $this->certificationManager->getContext($cn)->getIcons()]; } $response = $this->engine->renderResponse('@CertificationyWeb/Site/homepage.html.twig', ['count_members' => (int) $this->userRepository->countMembers(), 'certification_done' => (int) $this->redisClient->get('total'), 'certification_counters' => $certificationCounter]); return $response; }