FileCollectionRegistry

class \TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry

Implements
SingletonInterface

Registry for FileCollection classes

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$types  : array
Registered FileCollection types

Methods

__construct()  : mixed
Constructor
addTypeToTCA()  : array
Add the type to the TCA of sys_file_collection
fileCollectionTypeExists()  : bool
Checks if the given FileCollection type exists
getFileCollectionClass()  : string
Returns a class name for a given type
registerFileCollectionClass()  : bool
Register a (new) FileCollection type

Properties

$types

Registered FileCollection types

protected array $types = []

Methods

__construct()

Constructor

public __construct() : mixed

addTypeToTCA()

Add the type to the TCA of sys_file_collection

public addTypeToTCA(string $type, string $label, string $availableFields[, array $additionalColumns = [] ]) : array

Parameters

$type : string
$label : string
$availableFields : string

comma separated list of fields to show

$additionalColumns : array = []

Additional columns configuration

Return values

array —

adjusted TCA for sys_file_collection

fileCollectionTypeExists()

Checks if the given FileCollection type exists

public fileCollectionTypeExists(string $type) : bool

Parameters

$type : string

Type of the FileCollection

Return values

bool —

TRUE if the FileCollection exists, FALSE otherwise

getFileCollectionClass()

Returns a class name for a given type

public getFileCollectionClass(string $type) : string

Parameters

$type : string

Tags

throws
InvalidArgumentException

Return values

string —

The class name

registerFileCollectionClass()

Register a (new) FileCollection type

public registerFileCollectionClass(string $className, string $type[, bool $override = false ]) : bool

Parameters

$className : string
$type : string

FileCollection type max length 30 chars (db field restriction)

$override : bool = false

existing FileCollection type

Tags

throws
InvalidArgumentException

Return values

bool —

TRUE if registration succeeded

On this page