TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Resource\Index\MetaDataRepository Class Reference
Inheritance diagram for TYPO3\CMS\Core\Resource\Index\MetaDataRepository:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 findByFile (File $file)
 
 findByFileUid ($uid)
 
 createMetaDataRecord ($fileUid, array $additionalFields=[])
 
 update ($fileUid, array $data)
 
 removeByFileUid ($fileUid)
 

Static Public Member Functions

static getInstance ()
 

Protected Member Functions

 getDatabaseConnection ()
 
 getGeneralWhereClause ()
 
 getSignalSlotDispatcher ()
 
 getObjectManager ()
 
 emitRecordPostRetrievalSignal (\ArrayObject $data)
 
 emitRecordUpdatedSignal (array $data)
 
 emitRecordCreatedSignal (array $data)
 
 emitRecordDeletedSignal ($fileUid)
 

Protected Attributes

 $tableName = 'sys_file_metadata'
 
 $tableFields = []
 

Detailed Description

Repository Class as an abstraction layer to sys_file_metadata

Every access to table sys_file_metadata which is not handled by TCEmain has to use this Repository class

Definition at line 30 of file MetaDataRepository.php.

Member Function Documentation

◆ createMetaDataRecord()

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::createMetaDataRecord (   $fileUid,
array  $additionalFields = [] 
)

◆ emitRecordCreatedSignal()

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::emitRecordCreatedSignal ( array  $data)
protected

Signal that is called after an IndexRecord is created

Parameters
array$data

Definition at line 237 of file MetaDataRepository.php.

References TYPO3\CMS\Core\Resource\Index\MetaDataRepository\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\Index\MetaDataRepository\createMetaDataRecord().

◆ emitRecordDeletedSignal()

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::emitRecordDeletedSignal (   $fileUid)
protected

Signal that is called after an IndexRecord is deleted

Parameters
int$fileUid

Definition at line 248 of file MetaDataRepository.php.

References TYPO3\CMS\Core\Resource\Index\MetaDataRepository\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\Index\MetaDataRepository\removeByFileUid().

◆ emitRecordPostRetrievalSignal()

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::emitRecordPostRetrievalSignal ( \ArrayObject  $data)
protected

Signal that is called after a record has been loaded from database Allows other places to do extension of metadata at runtime or for example translation and workspace overlay

Parameters
\ArrayObject$data

Definition at line 215 of file MetaDataRepository.php.

References TYPO3\CMS\Core\Resource\Index\MetaDataRepository\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\Index\MetaDataRepository\findByFileUid().

◆ emitRecordUpdatedSignal()

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::emitRecordUpdatedSignal ( array  $data)
protected

Signal that is called after an IndexRecord is updated

Parameters
array$data

Definition at line 226 of file MetaDataRepository.php.

References TYPO3\CMS\Core\Resource\Index\MetaDataRepository\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\Index\MetaDataRepository\update().

◆ findByFile()

◆ findByFileUid()

◆ getDatabaseConnection()

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::getDatabaseConnection ( )
protected

◆ getGeneralWhereClause()

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::getGeneralWhereClause ( )
protected

General Where-Clause which is needed to fetch only language 0 and live record.

Returns
string

Definition at line 116 of file MetaDataRepository.php.

Referenced by TYPO3\CMS\Core\Resource\Index\MetaDataRepository\findByFileUid().

◆ getInstance()

static TYPO3\CMS\Core\Resource\Index\MetaDataRepository::getInstance ( )
static

◆ getObjectManager()

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::getObjectManager ( )
protected

Get the ObjectManager

Returns

Definition at line 202 of file MetaDataRepository.php.

Referenced by TYPO3\CMS\Core\Resource\Index\MetaDataRepository\getSignalSlotDispatcher().

◆ getSignalSlotDispatcher()

◆ removeByFileUid()

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::removeByFileUid (   $fileUid)

Remove all metadata records for a certain file from the database

Parameters
int$fileUid
Returns
void

Definition at line 181 of file MetaDataRepository.php.

References TYPO3\CMS\Core\Resource\Index\MetaDataRepository\emitRecordDeletedSignal(), and TYPO3\CMS\Core\Resource\Index\MetaDataRepository\getDatabaseConnection().

◆ update()

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::update (   $fileUid,
array  $data 
)

Member Data Documentation

◆ $tableFields

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::$tableFields = []
protected

Definition at line 42 of file MetaDataRepository.php.

◆ $tableName

TYPO3\CMS\Core\Resource\Index\MetaDataRepository::$tableName = 'sys_file_metadata'
protected

Definition at line 35 of file MetaDataRepository.php.