ImportController extends ImportExportController
Main script class for the Import facility
This class is not considered part of the public TYPO3 API.
Table of Contents
Constants
- NO_UPLOAD = 0
- UPLOAD_DONE = 1
- UPLOAD_FAILED = 2
Properties
- $iconFactory : IconFactory
- $id : int
- Page id
- $import : Import
- $lang : LanguageService
- $moduleTemplate : ModuleTemplate
- $moduleTemplateFactory : ModuleTemplateFactory
- $pageInfo : array<string|int, mixed>
- Page record of page id
- $pageRenderer : PageRenderer
- $permsClause : string
- A WHERE clause for selection records from the pages table based on read-permissions of the current backend user.
- $returnUrl : string
- Return URL of list module
- $routeName : string
- $standaloneView : StandaloneView
- $uriBuilder : UriBuilder
Methods
- __construct() : mixed
- Constructor
- mainAction() : ResponseInterface
- Incoming array has syntax:
- getBackendUser() : BackendUserAuthentication
- getExportFiles() : array<string|int, File>
- Gets all export files.
- getFile() : File|ProcessedFile|null
- Gets a file by combined identifier.
- getFilePathWithinFileMountBoundaries() : string
- getLanguageService() : LanguageService
- handleUpload() : array<string|int, mixed>
- Handle upload of an export file
- importData() : array<string|int, mixed>
- Import part of module
- main() : void
- makeForm() : void
- Create module forms
- preprocessInputData() : array<string|int, mixed>
- registerDocHeaderButtons() : void
- Create the panel of buttons for submitting the form or otherwise perform operations.
Constants
NO_UPLOAD
protected
mixed
NO_UPLOAD
= 0
UPLOAD_DONE
protected
mixed
UPLOAD_DONE
= 1
UPLOAD_FAILED
protected
mixed
UPLOAD_FAILED
= 2
Properties
$iconFactory
protected
IconFactory
$iconFactory
$id
Page id
protected
int
$id
$import
protected
Import
$import
$lang
protected
LanguageService
$lang
$moduleTemplate
protected
ModuleTemplate
$moduleTemplate
$moduleTemplateFactory
protected
ModuleTemplateFactory
$moduleTemplateFactory
$pageInfo
Page record of page id
protected
array<string|int, mixed>
$pageInfo
$pageRenderer
protected
PageRenderer
$pageRenderer
$permsClause
A WHERE clause for selection records from the pages table based on read-permissions of the current backend user.
protected
string
$permsClause
$returnUrl
Return URL of list module
protected
string
$returnUrl
$routeName
protected
string
$routeName
= 'tx_impexp_import'
$standaloneView
protected
StandaloneView
$standaloneView
$uriBuilder
protected
UriBuilder
$uriBuilder
Methods
__construct()
Constructor
public
__construct(IconFactory $iconFactory, PageRenderer $pageRenderer, UriBuilder $uriBuilder, ModuleTemplateFactory $moduleTemplateFactory) : mixed
Parameters
- $iconFactory : IconFactory
- $pageRenderer : PageRenderer
- $uriBuilder : UriBuilder
- $moduleTemplateFactory : ModuleTemplateFactory
mainAction()
Incoming array has syntax:
public
mainAction(ServerRequestInterface $request) : ResponseInterface
id = import page id (must be readable)
file = pointing to filename relative to public web path
[all relation fields are clear, but not files]
- page-tree is written first
- then remaining pages (to the root of import)
- then all other records are written either to related included pages or if not found to import-root (should be a sysFolder in most cases)
- then all internal relations are set and non-existing relations removed, relations to static tables preserved.
Parameters
- $request : ServerRequestInterface
Tags
Return values
ResponseInterfacegetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetExportFiles()
Gets all export files.
protected
getExportFiles() : array<string|int, File>
Tags
Return values
array<string|int, File>getFile()
Gets a file by combined identifier.
protected
getFile(string $combinedIdentifier) : File|ProcessedFile|null
Parameters
- $combinedIdentifier : string
Return values
File|ProcessedFile|nullgetFilePathWithinFileMountBoundaries()
protected
getFilePathWithinFileMountBoundaries(string $filePath) : string
Parameters
- $filePath : string
Return values
stringgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicehandleUpload()
Handle upload of an export file
protected
handleUpload(ServerRequestInterface $request, array<string|int, mixed> $inData) : array<string|int, mixed>
Parameters
- $request : ServerRequestInterface
- $inData : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —Modified data
importData()
Import part of module
protected
importData(array<string|int, mixed> $inData) : array<string|int, mixed>
Parameters
- $inData : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —Modified data
main()
protected
main(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
Tags
makeForm()
Create module forms
protected
makeForm() : void
preprocessInputData()
protected
preprocessInputData(array<string|int, mixed> $inData) : array<string|int, mixed>
Parameters
- $inData : array<string|int, mixed>
Return values
array<string|int, mixed>registerDocHeaderButtons()
Create the panel of buttons for submitting the form or otherwise perform operations.
protected
registerDocHeaderButtons() : void