Project

General

Profile

Actions

Task #53910

closed

Make FileCollections types configurable/extendable

Added by Frans Saris over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2013-11-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

Currently the the fileCollection types are hardcoded. It is not possible to add your own types.

You can extend the TCA so you can create you own collections in the backend. But in the RecourceFactory the conversion from type to object is hardcoded.

This should be changed so the class belonging to a type is fetched from configuration.

Actions #1

Updated by Frans Saris over 10 years ago

Proposal for the configuration:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['collections']['file']['types']['static'] = 'TYPO3\\CMS\\Core\\Resource\\Collection\\StaticFileCollection';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['collections']['file']['types']['folder'] = 'TYPO3\\CMS\\Core\\Resource\\Collection\\FolderBasedFileCollection';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['collections']['file']['types']['category'] = 'TYPO3\\CMS\\Core\\Resource\\Collection\\CategoryBasedFileCollection';

Actions #2

Updated by Frans Saris over 10 years ago

This gives the possibility to create your own collections types for example:

  • recursive folder collection
  • collection based on file type,size,creationdate,etc.
  • recreate the DAM selections
Actions #3

Updated by Gerrit Code Review about 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27257

Actions #4

Updated by Gerrit Code Review about 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27257

Actions #5

Updated by Frans Saris about 10 years ago

To test the pending patch:

Add following to you ext_tables.php


/** @var $registry TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry */
$registry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\Collection\\FileCollectionRegistry');
$registry->addTypeToTCA('mediaAlbum', 'MediaAlbum', 'storage,folder');

And this to ext_localconf.php

/** @var $registry TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry */
$registry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\Collection\\FileCollectionRegistry');
$registry->registerFileCollectionClass('TYPO3\\CMS\\Core\\Resource\\Collection\\FolderBasedFileCollection', 'mediaAlbum');

Now you should have a extra type when creating/editing the collection types that behaves just like the folder collection

Actions #6

Updated by Gerrit Code Review about 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27257

Actions #7

Updated by Gerrit Code Review about 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27257

Actions #8

Updated by Gerrit Code Review about 10 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27257

Actions #9

Updated by Gerrit Code Review about 10 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27257

Actions #10

Updated by Gerrit Code Review about 10 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27257

Actions #11

Updated by Gerrit Code Review about 10 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27257

Actions #12

Updated by Frans Saris about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF