TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Controller\File\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()

TYPO3\CMS\Backend\Controller\File\FileController::__construct ( )

Constructor

Definition at line 91 of file FileController.php.

References $GLOBALS, and TYPO3\CMS\Backend\Controller\File\FileController\init().

Member Function Documentation

◆ finish()

TYPO3\CMS\Backend\Controller\File\FileController::finish ( )

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

Returns
void

Definition at line 157 of file FileController.php.

References TYPO3\CMS\Core\Utility\HttpUtility\redirect(), and TYPO3\CMS\Backend\Utility\BackendUtility\setUpdateSignal().

◆ flattenResultDataValue()

TYPO3\CMS\Backend\Controller\File\FileController::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 260 of file FileController.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\date(), TYPO3\CMS\Core\Utility\GeneralUtility\inList(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), TYPO3Fluid\Fluid\Core\ViewHelper\Traits\render(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

Referenced by TYPO3\CMS\Backend\Controller\File\FileController\processAjaxRequest().

◆ getBackendUser()

TYPO3\CMS\Backend\Controller\File\FileController::getBackendUser ( )
protected

Returns the current BE user.

Returns

Definition at line 291 of file FileController.php.

References $GLOBALS.

◆ init()

◆ initClipboard()

TYPO3\CMS\Backend\Controller\File\FileController::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 TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\Backend\Controller\File\FileController\init().

◆ main()

TYPO3\CMS\Backend\Controller\File\FileController::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.

Referenced by TYPO3\CMS\Backend\Controller\File\FileController\mainAction(), and TYPO3\CMS\Backend\Controller\File\FileController\processAjaxRequest().

◆ mainAction()

TYPO3\CMS\Backend\Controller\File\FileController::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 173 of file FileController.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\locationHeaderUrl(), TYPO3\CMS\Backend\Controller\File\FileController\main(), and TYPO3\CMS\Backend\Utility\BackendUtility\setUpdateSignal().

◆ processAjaxRequest()

TYPO3\CMS\Backend\Controller\File\FileController::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 199 of file FileController.php.

References TYPO3\CMS\Backend\Controller\File\FileController\flattenResultDataValue(), TYPO3\CMS\Backend\Controller\File\FileController\main(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Member Data Documentation

◆ $CB

TYPO3\CMS\Backend\Controller\File\FileController::$CB
protected

Definition at line 48 of file FileController.php.

◆ $file

TYPO3\CMS\Backend\Controller\File\FileController::$file
protected

Definition at line 41 of file FileController.php.

◆ $fileData

TYPO3\CMS\Backend\Controller\File\FileController::$fileData
protected

Definition at line 86 of file FileController.php.

◆ $fileProcessor

TYPO3\CMS\Backend\Controller\File\FileController::$fileProcessor
protected

Definition at line 79 of file FileController.php.

◆ $overwriteExistingFiles

TYPO3\CMS\Backend\Controller\File\FileController::$overwriteExistingFiles
protected

Definition at line 56 of file FileController.php.

◆ $redirect

TYPO3\CMS\Backend\Controller\File\FileController::$redirect
protected

Definition at line 71 of file FileController.php.

◆ $vC

TYPO3\CMS\Backend\Controller\File\FileController::$vC
protected

Definition at line 64 of file FileController.php.