[TYPO3-mvc] extend FileCollection

Oliver Beck obeck at biznet.ch
Tue Jun 25 23:56:26 CEST 2013


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




More information about the TYPO3-project-typo3v4mvc mailing list