security->getUser(); if (!$user instanceof User) { throw new AccessDeniedHttpException('Only regular user can see this page'); } $exports = $this->exportManager->getExportsGrouped(true); $lastExecutions = []; foreach ($this->exportManager->getExports() as $alias => $export) { $lastExecutions[$alias] = $this->exportGenerationRepository->findExportGenerationByAliasAndUser($alias, $user, 5); } return new Response( $this->twig->render('@ChillMain/Export/layout.html.twig', [ 'grouped_exports' => $exports, 'last_executions' => $lastExecutions, ]), ); } }