‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\FileCollectionRepository Class Reference

Public Member Functions

Collection AbstractFileCollection null findByUid ($uid)
 
Collection AbstractFileCollection[] null findByType ($type)
 
Collection AbstractFileCollection[] null findAll ()
 

Protected Member Functions

Collection AbstractFileCollection[] null queryMultipleRecords (array $conditions=[])
 
TYPO3 CMS Core Collection AbstractRecordCollection[] createMultipleDomainObjects (array $data)
 
 getEnvironmentMode ()
 
Collection AbstractFileCollection createDomainObject (array $record)
 
ResourceFactory getFileFactory ()
 

Protected Attributes

string $table = 'sys_file_collection'
 
string $typeField = 'type'
 

Detailed Description

Repository for accessing file collections stored in the database

Definition at line 29 of file FileCollectionRepository.php.

Member Function Documentation

◆ createDomainObject()

Collection AbstractFileCollection TYPO3\CMS\Core\Resource\FileCollectionRepository::createDomainObject ( array  $record)
protected

◆ createMultipleDomainObjects()

TYPO3 CMS Core Collection AbstractRecordCollection [] TYPO3\CMS\Core\Resource\FileCollectionRepository::createMultipleDomainObjects ( array  $data)
protected

Creates multiple record collection domain objects.

Parameters
array$data‪Array of multiple database records to be reconstituted
Returns
‪\TYPO3\CMS\Core\Collection\AbstractRecordCollection[]

Definition at line 126 of file FileCollectionRepository.php.

References TYPO3\CMS\Core\Resource\FileCollectionRepository\createDomainObject().

Referenced by TYPO3\CMS\Core\Resource\FileCollectionRepository\queryMultipleRecords().

◆ findAll()

Collection AbstractFileCollection [] null TYPO3\CMS\Core\Resource\FileCollectionRepository::findAll ( )

Finds all record collections.

Returns
Collection\AbstractFileCollection[]|null

Definition at line 171 of file FileCollectionRepository.php.

References TYPO3\CMS\Core\Resource\FileCollectionRepository\queryMultipleRecords().

◆ findByType()

Collection AbstractFileCollection [] null TYPO3\CMS\Core\Resource\FileCollectionRepository::findByType (   $type)

Finds record collection by type.

Parameters
string$typeType to be looked up
Returns
Collection\AbstractFileCollection[]|null

Definition at line 79 of file FileCollectionRepository.php.

References TYPO3\CMS\Core\Resource\FileCollectionRepository\queryMultipleRecords().

◆ findByUid()

Collection AbstractFileCollection null TYPO3\CMS\Core\Resource\FileCollectionRepository::findByUid (   $uid)

Finds a record collection by uid.

Parameters
int$uid‪The uid to be looked up
Returns
Collection\AbstractFileCollection|null
Exceptions
Exception

Definition at line 46 of file FileCollectionRepository.php.

References TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Core\Resource\FileCollectionRepository\createDomainObject(), TYPO3\CMS\Core\Resource\FileCollectionRepository\getEnvironmentMode(), and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ getEnvironmentMode()

TYPO3\CMS\Core\Resource\FileCollectionRepository::getEnvironmentMode ( )
protected

Function to return the current application (FE/BE) based on $GLOBALS[TSFE]. This function can be mocked in unit tests to be able to test frontend behaviour.

Definition at line 139 of file FileCollectionRepository.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Resource\FileCollectionRepository\findByUid().

◆ getFileFactory()

ResourceFactory TYPO3\CMS\Core\Resource\FileCollectionRepository::getFileFactory ( )
protected

Gets the file factory.

Returns
ResourceFactory

Definition at line 161 of file FileCollectionRepository.php.

Referenced by TYPO3\CMS\Core\Resource\FileCollectionRepository\createDomainObject().

◆ queryMultipleRecords()

Collection AbstractFileCollection [] null TYPO3\CMS\Core\Resource\FileCollectionRepository::queryMultipleRecords ( array  $conditions = [])
protected

Queries for multiple records for the given conditions.

Parameters
array$conditions‪Conditions concatenated with AND for query
Returns
Collection\AbstractFileCollection[]|null

Definition at line 96 of file FileCollectionRepository.php.

References TYPO3\CMS\Core\Resource\FileCollectionRepository\createMultipleDomainObjects().

Referenced by TYPO3\CMS\Core\Resource\FileCollectionRepository\findAll(), and TYPO3\CMS\Core\Resource\FileCollectionRepository\findByType().

Member Data Documentation

◆ $table

string TYPO3\CMS\Core\Resource\FileCollectionRepository::$table = 'sys_file_collection'
protected

Definition at line 33 of file FileCollectionRepository.php.

◆ $typeField

string TYPO3\CMS\Core\Resource\FileCollectionRepository::$typeField = 'type'
protected

Definition at line 37 of file FileCollectionRepository.php.