AbstractOnlineMediaHelper

abstract class \TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\AbstractOnlineMediaHelper

Implements
OnlineMediaHelperInterface
Uses
ResourceInstructionTrait

Table of Contents

Interfaces

OnlineMediaHelperInterface
Interface OnlineMediaInterface

Properties

$extension  : string
File extension bind to the OnlineMedia helper
$onlineMediaIdCache  : array
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
Returns an instance of the FileIndexRepository
getResourceFactory()  : ResourceFactory
Returns the 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 $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

string

createNewFile()

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

File

findExistingFileByOnlineMediaId()

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|null

getTempFolderPath()

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.

Return values

string
On this page