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

Public Member Functions

 createAction (ServerRequestInterface $request, ResponseInterface $response)
 
 mainAction (ServerRequestInterface $request, ResponseInterface $response)
 

Protected Member Functions

 addMediaFromUrl ($url, $targetFolderIdentifier, array $allowedExtensions=[])
 
 getBackendUser ()
 
 getLanguageService ()
 

Detailed Description

Class OnlineMediaController handles uploading online media

Definition at line 30 of file OnlineMediaController.php.

Member Function Documentation

addMediaFromUrl (   $url,
  $targetFolderIdentifier,
array  $allowedExtensions = [] 
)
protected
Parameters
string$url
string$targetFolderIdentifier
string[]$allowedExtensions
Returns
File|NULL

Definition at line 115 of file OnlineMediaController.php.

References $url, OnlineMediaController\getBackendUser(), OnlineMediaHelperRegistry\getInstance(), and ResourceFactory\getInstance().

Referenced by OnlineMediaController\createAction(), and OnlineMediaController\mainAction().

createAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

AJAX endpoint for storing the URL as a sys_file record

Parameters
ServerRequestInterface$request
ResponseInterface$response
Returns
ResponseInterface

Definition at line 39 of file OnlineMediaController.php.

References $response, $url, OnlineMediaController\addMediaFromUrl(), MessageInterface\getBody(), OnlineMediaController\getLanguageService(), ServerRequestInterface\getParsedBody(), and GeneralUtility\trimExplode().

getBackendUser ( )
protected
Returns

Definition at line 150 of file OnlineMediaController.php.

References $GLOBALS.

Referenced by OnlineMediaController\addMediaFromUrl().

getLanguageService ( )
protected
Returns
LanguageService

Definition at line 158 of file OnlineMediaController.php.

References $GLOBALS.

Referenced by OnlineMediaController\createAction(), and OnlineMediaController\mainAction().

mainAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)