TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
FileDeletionAspect Class Reference

Public Member Functions

 removeFromRepository (FileInterface $fileObject)
 
 cleanupProcessedFilesPostFileAdd (FileInterface $file, $targetFolder)
 
 cleanupProcessedFilesPostFileReplace (FileInterface $file, $localFilePath)
 

Protected Member Functions

 getFileIndexRepository ()
 
 getMetaDataRepository ()
 
 getProcessedFileRepository ()
 
 getDatabaseConnection ()
 
 cleanupCategoryReferences (File $fileObject)
 

Detailed Description

Class FileDeletionAspect

We do not have AOP in TYPO3 for now, thus the aspect which deals with deleted files is a slot which reacts on a signal on file deletion.

The aspect cleans up database records, processed files and filereferences

Definition at line 31 of file FileDeletionAspect.php.

Member Function Documentation

cleanupCategoryReferences ( File  $fileObject)
protected

Remove all category references of the deleted file.

Parameters
File$fileObject
Returns
void

Definition at line 126 of file FileDeletionAspect.php.

References File\_getMetaData(), and FileDeletionAspect\getDatabaseConnection().

Referenced by FileDeletionAspect\removeFromRepository().

cleanupProcessedFilesPostFileAdd ( FileInterface  $file,
  $targetFolder 
)

Remove all processed files on SIGNAL_PostFileAdd

Parameters
FileInterface$file
string$targetFolder

Definition at line 104 of file FileDeletionAspect.php.

cleanupProcessedFilesPostFileReplace ( FileInterface  $file,
  $localFilePath 
)

Remove all processed files on SIGNAL_PostFileReplace

Parameters
FileInterface$file
string$localFilePath

Definition at line 115 of file FileDeletionAspect.php.

getDatabaseConnection ( )
protected

Wrapper method for getting DatabaseConnection

Returns

Definition at line 68 of file FileDeletionAspect.php.

References $GLOBALS.

Referenced by FileDeletionAspect\cleanupCategoryReferences(), and FileDeletionAspect\removeFromRepository().

getFileIndexRepository ( )
protected

Return a file index repository

Returns

Definition at line 38 of file FileDeletionAspect.php.

References GeneralUtility\makeInstance().

Referenced by FileDeletionAspect\removeFromRepository().

getMetaDataRepository ( )
protected

Return a metadata repository

Returns

Definition at line 48 of file FileDeletionAspect.php.

References GeneralUtility\makeInstance().

Referenced by FileDeletionAspect\removeFromRepository().

getProcessedFileRepository ( )
protected

Return a processed file repository

Returns

Definition at line 58 of file FileDeletionAspect.php.

References GeneralUtility\makeInstance().

removeFromRepository ( FileInterface  $fileObject)