FileCollectionRepository
Repository for accessing file collections stored in the database
Table of Contents
Properties
- $table : string
- $typeField : string
Methods
- findAll() : array<string|int, AbstractFileCollection>|null
- Finds all record collections.
- findByType() : array<string|int, AbstractFileCollection>|null
- Finds record collection by type.
- findByUid() : AbstractFileCollection|null
- Finds a record collection by uid.
- createDomainObject() : AbstractFileCollection
- Creates a record collection domain object.
- createMultipleDomainObjects() : array<string|int, AbstractRecordCollection>
- Creates multiple record collection domain objects.
- getEnvironmentMode() : string
- Function to return the current application (FE/BE) based on $GLOBALS[TSFE].
- getFileFactory() : ResourceFactory
- Gets the file factory.
- queryMultipleRecords() : array<string|int, AbstractFileCollection>|null
- Queries for multiple records for the given conditions.
Properties
$table
protected
string
$table
= 'sys_file_collection'
$typeField
protected
string
$typeField
= 'type'
Methods
findAll()
Finds all record collections.
public
findAll() : array<string|int, AbstractFileCollection>|null
Return values
array<string|int, AbstractFileCollection>|nullfindByType()
Finds record collection by type.
public
findByType(string $type) : array<string|int, AbstractFileCollection>|null
Parameters
- $type : string
-
Type to be looked up
Return values
array<string|int, AbstractFileCollection>|nullfindByUid()
Finds a record collection by uid.
public
findByUid(int $uid) : AbstractFileCollection|null
Parameters
- $uid : int
-
The uid to be looked up
Tags
Return values
AbstractFileCollection|nullcreateDomainObject()
Creates a record collection domain object.
protected
createDomainObject(array<string|int, mixed> $record) : AbstractFileCollection
Parameters
- $record : array<string|int, mixed>
-
Database record to be reconstituted
Return values
AbstractFileCollectioncreateMultipleDomainObjects()
Creates multiple record collection domain objects.
protected
createMultipleDomainObjects(array<string|int, mixed> $data) : array<string|int, AbstractRecordCollection>
Parameters
- $data : array<string|int, mixed>
-
Array of multiple database records to be reconstituted
Return values
array<string|int, AbstractRecordCollection>getEnvironmentMode()
Function to return the current application (FE/BE) based on $GLOBALS[TSFE].
protected
getEnvironmentMode() : string
This function can be mocked in unit tests to be able to test frontend behaviour.
Return values
stringgetFileFactory()
Gets the file factory.
protected
getFileFactory() : ResourceFactory
Return values
ResourceFactoryqueryMultipleRecords()
Queries for multiple records for the given conditions.
protected
queryMultipleRecords([array<string|int, mixed> $conditions = [] ]) : array<string|int, AbstractFileCollection>|null
Parameters
- $conditions : array<string|int, mixed> = []
-
Conditions concatenated with AND for query