TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
FileController Class Reference

Public Member Functions

 __construct ()
 
 initClipboard ()
 
 main ()
 
 finish ()
 
 mainAction (ServerRequestInterface $request, ResponseInterface $response)
 
 processAjaxRequest (ServerRequestInterface $request, ResponseInterface $response)
 

Protected Member Functions

 init ()
 
 flattenResultDataValue ($result)
 
 getBackendUser ()
 

Protected Attributes

 $file
 
 $CB
 
 $overwriteExistingFiles
 
 $vC
 
 $redirect
 
 $fileProcessor
 
 $fileData
 

Detailed Description

Gateway for TCE (TYPO3 Core Engine) file-handling through POST forms. This script serves as the file administration part of the TYPO3 Core Engine. Basically it includes two libraries which are used to manipulate files on the server. Before TYPO3 4.3, it was located in typo3/tce_file.php and redirected back to a $redirectURL. Since 4.3 this class is also used for accessing via AJAX

Definition at line 34 of file FileController.php.

Constructor & Destructor Documentation

__construct ( )

Constructor

Definition at line 91 of file FileController.php.

References $GLOBALS, and FileController\init().

Member Function Documentation

finish ( )

Redirecting the user after the processing has been done. Might also display error messages directly, if any.

Returns
void

Definition at line 163 of file FileController.php.

References HttpUtility\redirect(), and BackendUtility\setUpdateSignal().

flattenResultDataValue (   $result)
protected

Flatten result value from FileProcessor

The value can be a File, Folder or boolean

Parameters
bool | \TYPO3\CMS\Core\Resource\File | \TYPO3\CMS\Core\Resource\Folder$result
Returns
bool|string|array

Definition at line 276 of file FileController.php.

References $GLOBALS, BackendUtility\date(), GeneralUtility\inList(), GeneralUtility\makeInstance(), and Icon\SIZE_SMALL.

Referenced by FileController\processAjaxRequest().

getBackendUser ( )
protected

Returns the current BE user.

Returns

Definition at line 307 of file FileController.php.

References $GLOBALS.

Referenced by FileController\main().

init ( )
protected
initClipboard ( )

Initialize the Clipboard. This will fetch the data about files to paste/delete if such an action has been sent.

Returns
void

Definition at line 119 of file FileController.php.

References GeneralUtility\makeInstance().

Referenced by FileController\init().

main ( )

Performing the file admin action: Initializes the objects, setting permissions, sending data to object.

Returns
void

Definition at line 141 of file FileController.php.

References $GLOBALS, FileController\getBackendUser(), and GeneralUtility\getIndpEnv().

Referenced by FileController\mainAction(), and FileController\processAjaxRequest().

mainAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

Injects the request object for the current request or subrequest As this controller goes only through the main() method, it just redirects to the given URL afterwards.

Parameters
ServerRequestInterface$requestthe current request
ResponseInterface$response
Returns
ResponseInterface the response with the content

Definition at line 179 of file FileController.php.

References FileController\$redirect, GeneralUtility\locationHeaderUrl(), FileController\main(), and BackendUtility\setUpdateSignal().

processAjaxRequest ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

Handles the actual process from within the ajaxExec function therefore, it does exactly the same as the real typo3/tce_file.php but without calling the "finish" method, thus makes it simpler to deal with the actual return value

Parameters
ServerRequestInterface$request
ResponseInterface$response
Returns
ResponseInterface

Definition at line 215 of file FileController.php.

References FileController\flattenResultDataValue(), and FileController\main().

Member Data Documentation

$CB
protected

Definition at line 48 of file FileController.php.

$file
protected

Definition at line 41 of file FileController.php.

$fileData
protected

Definition at line 86 of file FileController.php.

$fileProcessor
protected

Definition at line 79 of file FileController.php.

$overwriteExistingFiles
protected

Definition at line 56 of file FileController.php.

$redirect
protected

Definition at line 71 of file FileController.php.

Referenced by FileController\mainAction().

$vC
protected

Definition at line 64 of file FileController.php.