TYPO3 CMS  TYPO3_6-2
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=array())
 
 getFileCollectionClass ($type)
 
 fileCollectionTypeExists ($type)
 

Protected Attributes

 $types = array()
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! 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 = array() 
)

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 83 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
boolean TRUE if the FileCollection exists, FALSE otherwise

Definition at line 129 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 116 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 47 of file FileCollectionRegistry.php.

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

Member Data Documentation

◆ $types

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

Definition at line 27 of file FileCollectionRegistry.php.