OnlineMediaHelperRegistry implements SingletonInterface
Online Media Source Registry
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
Methods
- getInstance() : OnlineMediaHelperRegistry
- Returns an instance of this class
- getOnlineMediaHelper() : false|OnlineMediaHelperInterface
- Get helper class for given File
- getSupportedFileExtensions() : array<string|int, string>
- Get all file extensions that have an OnlineMediaHelper
- hasOnlineMediaHelper() : bool
- Checks if there is a helper for this file extension
- transformUrlToFile() : File|null
- Try to transform given URL to a File
Methods
getInstance()
Returns an instance of this class
public
static getInstance() : OnlineMediaHelperRegistry
will be removed in TYPO3 v12.0. Use Dependency Injection or GeneralUtility::makeInstance() if DI is not possible.
Return values
OnlineMediaHelperRegistrygetOnlineMediaHelper()
Get helper class for given File
public
getOnlineMediaHelper(File $file) : false|OnlineMediaHelperInterface
Parameters
- $file : File
Return values
false|OnlineMediaHelperInterfacegetSupportedFileExtensions()
Get all file extensions that have an OnlineMediaHelper
public
getSupportedFileExtensions() : array<string|int, string>
Return values
array<string|int, string>hasOnlineMediaHelper()
Checks if there is a helper for this file extension
public
hasOnlineMediaHelper(string $fileExtension) : bool
Parameters
- $fileExtension : string
Return values
booltransformUrlToFile()
Try to transform given URL to a File
public
transformUrlToFile(string $url, Folder $targetFolder[, array<string|int, string> $allowedExtensions = [] ]) : File|null
Parameters
- $url : string
- $targetFolder : Folder
- $allowedExtensions : array<string|int, string> = []