FileCollectionRepository
class \
Repository for accessing file collections stored in the database
Table of Contents
Properties
- $table : string
- $typeField : string
Methods
- findAll() : AbstractFileCollection[]|null
- Finds all record collections.
- findByType() : 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() : 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() : 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() : AbstractFileCollection[]|null
Return values
AbstractFileCollection[]|nullfindByType()
Finds record collection by type.
public
findByType(string $type) : AbstractFileCollection[]|null
Parameters
- $type : string
-
Type to be looked up
Return values
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 $record) : AbstractFileCollection
Parameters
- $record : array
-
Database record to be reconstituted
Return values
AbstractFileCollectioncreateMultipleDomainObjects()
Creates multiple record collection domain objects.
protected
createMultipleDomainObjects(array $data) : AbstractRecordCollection[]
Parameters
- $data : array
-
Array of multiple database records to be reconstituted
Return values
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 $conditions = [] ]) : AbstractFileCollection[]|null
Parameters
- $conditions : array = []
-
Conditions concatenated with AND for query