/** * @return void */ public function indexAction() { $combinedIdentifier = GeneralUtility::_GP('id'); if (isset($combinedIdentifier) && is_string($combinedIdentifier)) { $folder = $this->resourceFactory->getFolderObjectFromCombinedIdentifier($combinedIdentifier); $files = []; foreach ($folder->getFiles() as $file) { $files[$file->getStorage()->getUid() . ':' . $file->getIdentifier()] = $file->getName(); } $this->view->assign('folder', $files); } $this->view->assign('imports', $this->importRepository->findUserQueue()); }
/** * @param $relFolderPath * @param $pathExists * @return \TYPO3\CMS\Core\Resource\Folder */ protected function createFolderObject($relFolderPath, $pathExists) { if (!$pathExists) { $storage = $this->folderRepository->findByUid(1); return $this->fileFactory->createFolderObject($storage, $relFolderPath, 'upload_folder'); } else { return $this->fileFactory->getFolderObjectFromCombinedIdentifier("1:{$relFolderPath}"); } }