OnlineMediaController
Class OnlineMediaController handles uploading online media
This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.
Attributes
- #[AsController]
Table of Contents
Properties
- $flashMessageService : FlashMessageService
- $onlineMediaHelperRegistry : OnlineMediaHelperRegistry
- $resourceFactory : ResourceFactory
- $uploadFolderResolver : DefaultUploadFolderResolver
Methods
- __construct() : mixed
- createAction() : ResponseInterface
- AJAX endpoint for storing the URL as a sys_file record
- mainAction() : ResponseInterface
- Process add media request, and redirects to the previous page
- addFlashMessage() : void
- Add flash message to message queue
- addMediaFromUrl() : File|null
- getBackendUser() : BackendUserAuthentication
- getLanguageService() : LanguageService
Properties
$flashMessageService read-only
protected
FlashMessageService
$flashMessageService
$onlineMediaHelperRegistry read-only
protected
OnlineMediaHelperRegistry
$onlineMediaHelperRegistry
$resourceFactory read-only
protected
ResourceFactory
$resourceFactory
$uploadFolderResolver read-only
protected
DefaultUploadFolderResolver
$uploadFolderResolver
Methods
__construct()
public
__construct(ResourceFactory $resourceFactory, DefaultUploadFolderResolver $uploadFolderResolver, OnlineMediaHelperRegistry $onlineMediaHelperRegistry, FlashMessageService $flashMessageService) : mixed
Parameters
- $resourceFactory : ResourceFactory
- $uploadFolderResolver : DefaultUploadFolderResolver
- $onlineMediaHelperRegistry : OnlineMediaHelperRegistry
- $flashMessageService : FlashMessageService
createAction()
AJAX endpoint for storing the URL as a sys_file record
public
createAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacemainAction()
Process add media request, and redirects to the previous page
public
mainAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Tags
Return values
ResponseInterfaceaddFlashMessage()
Add flash message to message queue
protected
addFlashMessage(FlashMessage $flashMessage) : void
Parameters
- $flashMessage : FlashMessage
addMediaFromUrl()
protected
addMediaFromUrl(string $url, string $targetFolderIdentifier[, array<string|int, string> $allowedExtensions = [] ]) : File|null
Parameters
- $url : string
- $targetFolderIdentifier : string
- $allowedExtensions : array<string|int, string> = []
Return values
File|nullgetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
protected
getLanguageService() : LanguageService