/** * Get last operations data * * @param array $types * * @return array */ public function getLastOperationsData(array $types) { $types = array_filter($types, function ($type) { return $this->securityFacade->isGranted(sprintf('pim_importexport_%s_execution_show', $type)); }); return $this->repository->getLastOperationsData($types); }
/** * Download an archived file * * @param int $id * @param string $archiver * @param string $key * * @return StreamedResponse */ public function downloadFilesAction($id, $archiver, $key) { $jobExecution = $this->jobExecutionRepo->find($id); if (null === $jobExecution) { throw new NotFoundHttpException('Akeneo\\Component\\Batch\\Model\\JobExecution entity not found'); } $this->eventDispatcher->dispatch(JobExecutionEvents::PRE_DOWNLOAD_FILES, new GenericEvent($jobExecution)); $stream = $this->archivist->getArchive($jobExecution, $archiver, $key); return new StreamedFileResponse($stream); }