AbstractOnlineMediaHelper implements OnlineMediaHelperInterface uses ResourceInstructionTrait
AbstractYes
Table of Contents
Interfaces
- OnlineMediaHelperInterface
- Interface OnlineMediaInterface
Properties
- $extension : string
- File extension bind to the OnlineMedia helper
- $onlineMediaIdCache : array<string|int, mixed>
- Cached OnlineMediaIds [fileUid => id]
Methods
- __construct() : mixed
- Constructor
- getOnlineMediaId() : string
- Get Online Media item id
- createNewFile() : File
- Create new OnlineMedia item container file.
- findExistingFileByOnlineMediaId() : File|null
- Search for files with same onlineMediaId by content hash in indexed storage
- getFileIndexRepository() : FileIndexRepository
- getResourceFactory() : ResourceFactory
- getTempFolderPath() : string
- Get temporary folder path to save preview images.
Properties
$extension
File extension bind to the OnlineMedia helper
        protected
            string
    $extension
     = ''
    
    
    
    
    
$onlineMediaIdCache
Cached OnlineMediaIds [fileUid => id]
        protected
            array<string|int, mixed>
    $onlineMediaIdCache
     = []
    
    
    
    
    
Methods
__construct()
Constructor
    public
                    __construct(string $extension) : mixed
    Parameters
- $extension : string
- 
                    file extension bind to the OnlineMedia helper 
getOnlineMediaId()
Get Online Media item id
    public
                    getOnlineMediaId(File $file) : string
    Parameters
- $file : File
Return values
stringcreateNewFile()
Create new OnlineMedia item container file.
    protected
                    createNewFile(Folder $targetFolder, string $fileName, string $onlineMediaId) : File
    This is created inside typo3temp/ and then moved from FAL to the proper storage.
Parameters
- $targetFolder : Folder
- $fileName : string
- $onlineMediaId : string
Return values
FilefindExistingFileByOnlineMediaId()
Search for files with same onlineMediaId by content hash in indexed storage
    protected
                    findExistingFileByOnlineMediaId(string $onlineMediaId, Folder $targetFolder, string $fileExtension) : File|null
    Parameters
- $onlineMediaId : string
- $targetFolder : Folder
- $fileExtension : string
Return values
File|nullgetFileIndexRepository()
    protected
                    getFileIndexRepository() : FileIndexRepository
    Return values
FileIndexRepositorygetResourceFactory()
    protected
                    getResourceFactory() : ResourceFactory
    Return values
ResourceFactorygetTempFolderPath()
Get temporary folder path to save preview images.
    protected
                    getTempFolderPath() : string
    In composer-mode with TYPO3 installations, this needs to be put under public/ In the future this should be handled via processed file objects.