[TYPO3-mvc] extbase way of accessing folder based file collection

Frans Saris franssaris at gmail.com
Tue Jun 18 20:17:11 CEST 2013


Hi Dominic,

following works for me:

*PHP*
/**  * fileCollectionRepository
 *
 * @var \TYPO3\CMS\Core\Resource\FileCollectionRepository
* @inject */ protected $fileCollectionRepository;

/** * Show album thumbs
* * @param \MiniFranske\FsMediaGallery\Domain\Model\MediaAlbum $mediaAlbum
* @param int $page the page number * @return void */
public function
showAction(\MiniFranske\FsMediaGallery\Domain\Model\MediaAlbum $mediaAlbum,
$page = 1) {

/** @var $fileCollection
\TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection */
$fileCollection =
$this->fileCollectionRepository->findByUid($mediaAlbum->getUid());
$fileCollection->loadContents();

$this->view->assign('fileCollection', $fileCollection);
}

FLUID
<f:for each="{fileCollection.items}" as="albumItem">
 <f:render partial="MediaItem/Thumb"
arguments="{mediaAlbum:mediaAlbum,mediaItem:albumItem}" />
</f:for>


gr. Frans


2013/6/18 Frans Saris <franssaris at gmail.com>

> Wil have a look at it later today. I tought that I used the folder based
> collection in my (work in progress) extension.
>
> Gr. Frans
> Op 18 jun. 2013 03:45 schreef "Domi" <djgarms at gmail.com> het volgende:
>
> > Hi Frans,
> >
> > thanks for your answer. But all I can find in media_gallery is the
> > StaticFileCollection, which works in my flux_gallery already. I am
> looking
> > for a way accessing the FolderBasedFileCollection.
> >
> > Any thoughts or is the implementation currently just incomplete? Is there
> > an open issue for this already on forge?
> >
> > Cheers,
> > Dominic
> > ______________________________**_________________
> > TYPO3-project-typo3v4mvc mailing list
> > TYPO3-project-typo3v4mvc@**lists.typo3.org<
> TYPO3-project-typo3v4mvc at lists.typo3.org>
> > http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
> > project-typo3v4mvc<
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
> >
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>


More information about the TYPO3-project-typo3v4mvc mailing list