[TYPO3-mvc] extend FileCollection

Frans Saris franssaris at gmail.com
Mon Sep 23 08:58:38 CEST 2013


Hi Dirk,

you can find my approach here
https://bitbucket.org/franssaris/fs_media_gallery

gr. Frans


2013/9/21 Dirk Wenzel <wenzel at webfox03.de>

> Hi Frans,
> I'm working at extending FileCollection too and got stuck.
> Would you please provide the link to your repository that you mentioned?
>
> Cheers
> Dirk
>
> Am 26.06.13 09:21, schrieb Frans Saris:
>
>  Hi,
>>
>> did something simular in a extension I'm building. The problem with
>> current
>> implementation of *FileCollection in core is that you can not easily
>> extend
>> it so it uses your models. Also it isn't extbase.
>> I extended TCA of sys_file_collection and created a model that represents
>> almost all fields from sys_file_collection. Than I added a link between my
>> model and the original *FileCollection by injecting the filecollection
>> repository in my FileCollecion model and created some "proxy" functions to
>> get the items from collection.
>>
>> I use this for a gallery extension I'm working on. I can give you a link
>> to
>> my git repository but it's work in progress so not completely working.
>> This
>> part is working... :)
>>
>> gr. Frans
>>
>>
>> 2013/6/25 Oliver Beck <obeck at biznet.ch>
>>
>>  Hi all
>>>
>>> I'd like to use the Static- and Folder based filecollections in my
>>> Extbase
>>> extensions. Out of the box it works very well, I can access all the data
>>> of
>>> the filecollections. Now I need more fields (a text and a date field) for
>>> the collections. I tought this is easy: create two models, which extends
>>> both FileCollection Model (\TYPO3\CMS\Core\Resource\****Collection\****
>>> StaticFileCollection
>>> and \TYPO3\CMS\Core\Resource\****Collection\****FolderBasedCollection),
>>> create a Repository which extends the corresponding Repository and map
>>> the
>>> table on the models with typoscript. At least I updated the
>>> sys_file_collection table / TCA with the two fields. I made a
>>> findAll-query
>>> on my new Repository and still get objects of the original model
>>> (\TYPO3\CMS\Core\Collection\****StaticFileCollection), logically without
>>> the two new properties.
>>>
>>> Did somebody else already extend the sys_file_collection?
>>> Kind Regards, Oliver
>>>
>>>
>>> ______________________________****_________________
>>> TYPO3-project-typo3v4mvc mailing list
>>> TYPO3-project-typo3v4mvc@**lis**ts.typo3.org <http://lists.typo3.org><
>>> TYPO3-project-**typo3v4mvc at lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
>>> >
>>> http://lists.typo3.org/cgi-****bin/mailman/listinfo/typo3-**<http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**>
>>> project-typo3v4mvc<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@**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>
>


More information about the TYPO3-project-typo3v4mvc mailing list