TYPO3 CMS  TYPO3_7-6
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 ()
 
 registerFileCollectionClass ($className, $type, $override=false)
 
 addTypeToTCA ($type, $label, $availableFields, array $additionalColumns=[])
 
 getFileCollectionClass ($type)
 
 fileCollectionTypeExists ($type)
 

Protected Attributes

 $types = []
 

Detailed Description

Registry for FileCollection classes

Definition at line 20 of file FileCollectionRegistry.php.

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ addTypeToTCA()

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$availableFieldscomma separated list of fields to show
array$additionalColumnsAdditional columns configuration
Returns
array adjusted TCA for sys_file_collection

Definition at line 84 of file FileCollectionRegistry.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule().

◆ fileCollectionTypeExists()

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 131 of file FileCollectionRegistry.php.

◆ getFileCollectionClass()

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 117 of file FileCollectionRegistry.php.

◆ registerFileCollectionClass()

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

Register a (new) FileCollection type

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

Definition at line 48 of file FileCollectionRegistry.php.

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

Member Data Documentation

◆ $types

TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry::$types = []
protected

Definition at line 27 of file FileCollectionRegistry.php.