[TASK] Add FileCollectionRegistry
The classes belonging to the FileCollection types are hardwired in ResourceFactory::createCollectionObject(), therefore you can not use your own types. This change introduces a Registry API that makes it possible to register your own FileCollection type + class and has a generic way to add the new type to TCA[sys_file_collection]. How to use: - Register type in ext_localconf.php $register->registerFileCollectionClass(full_class_name, your_type); - Add type to TCA in Configuration/TCA/sys_file_collection.php $register->addTypeToTCA(your_type, label, needed_fields); return $GLOBALS['TCA']['sys_file_collection']; Resolves: #53910 Documentation: #56032 Releases: 6.2 Change-Id: Id6cb1c7a59f741b28fee7bdfef32890f34a072a5 Reviewed-on: https://review.typo3.org/27257 Reviewed-by: Markus Klein Tested-by: Markus Klein Reviewed-by: Wouter Wolters Tested-by: Wouter Wolters
Showing
- typo3/sysext/core/Classes/Resource/Collection/FileCollectionRegistry.php 146 additions, 0 deletions...re/Classes/Resource/Collection/FileCollectionRegistry.php
- typo3/sysext/core/Classes/Resource/ResourceFactory.php 5 additions, 14 deletionstypo3/sysext/core/Classes/Resource/ResourceFactory.php
- typo3/sysext/core/Configuration/DefaultConfiguration.php 5 additions, 0 deletionstypo3/sysext/core/Configuration/DefaultConfiguration.php
- typo3/sysext/core/Tests/Unit/Resource/Collection/FileCollectionRegistryTest.php 188 additions, 0 deletions...s/Unit/Resource/Collection/FileCollectionRegistryTest.php
Please register or sign in to comment