‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry Class Reference
Inheritance diagram for TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct ()
 
bool registerFileCollectionClass ($className, $type, $override=false)
 
array addTypeToTCA ($type, $label, $availableFields, array $additionalColumns=[])
 
string getFileCollectionClass ($type)
 
bool fileCollectionTypeExists ($type)
 

Protected Attributes

array $types = array( )
 

Detailed Description

Registry for FileCollection classes

Definition at line 24 of file FileCollectionRegistry.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry::__construct ( )

Member Function Documentation

◆ addTypeToTCA()

array TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry::addTypeToTCA (   $type,
  $label,
  $availableFields,
array  $additionalColumns = [] 
)

Add the type to the TCA of sys_file_collection

Parameters
string$type
string$label
string$availableFields‪comma separated list of fields to show
array$additionalColumns‪Additional columns configuration
Returns
‪array adjusted TCA for sys_file_collection

Definition at line 88 of file FileCollectionRegistry.php.

References $GLOBALS.

◆ fileCollectionTypeExists()

bool TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry::fileCollectionTypeExists (   $type)

Checks if the given FileCollection type exists

Parameters
string$typeType of the FileCollection
Returns
‪bool TRUE if the FileCollection exists, FALSE otherwise

Definition at line 135 of file FileCollectionRegistry.php.

◆ getFileCollectionClass()

string TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry::getFileCollectionClass (   $type)

Returns a class name for a given type

Parameters
string$type
Returns
‪string The class name
Exceptions

Definition at line 121 of file FileCollectionRegistry.php.

◆ registerFileCollectionClass()

bool TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry::registerFileCollectionClass (   $className,
  $type,
  $override = false 
)

Register a (new) FileCollection type

Parameters
string$className
string$type‪FileCollection type max length 30 chars (db field restriction)
bool$override‪existing FileCollection type
Returns
‪bool TRUE if registration succeeded
Exceptions

Definition at line 51 of file FileCollectionRegistry.php.

Referenced by TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry\__construct().

Member Data Documentation

◆ $types

array TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry::$types = array( )
protected

Registered FileCollection types

Definition at line 30 of file FileCollectionRegistry.php.