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

createDomainObject()

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
AbstractFileCollection

createMultipleDomainObjects()

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
string

queryMultipleRecords()

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

Return values
array<string|int, AbstractFileCollection>|null

        
On this page

Search results