#49211content of fileCollectionRepository is always empty
Description
Hello,
currently I don’t see any possibility to reach the folder of a FolderBasedFileCollection.
/** * @var \TYPO3\CMS\Core\Resource\FileCollectionRepository * @inject */ protected $fileCollectionRepository; (...) $fileCollectionItem = $this->fileCollectionRepository->findByUid($uid); $content = $fileCollectionItem->loadContents();
$content is always empty and $fileCollectionItem->toArray() doesn’t display the folder either.
Is there any documentation out how to reach the FolderBasedFileCollection?
For StaticFileCollection I currently use
$fileRepository = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\FileRepository');
$fileCollection = $fileRepository->findByRelation('sys_file_collection', 'files', $uid);
foreach ($fileCollection as $item) {
/** @var FileReference $item */
$files[] = $item->toArray();
}
But I’m unsure if this is correct, shouldn’t work $fileCollection->loadContents() here as well?
Do I miss anything important for using the FAL FileCollections feature?
In xDebug I can see inside of my object all information, but no possibility to reach it through the given functions.
Regards,
Dominic
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.