ImportController

class \TYPO3\CMS\Impexp\Controller\ImportController

Extends
ImportExportController

Main script class for the Import facility

Table of Contents

Constants

NO_UPLOAD  : mixed = 0
UPLOAD_DONE  : mixed = 1
UPLOAD_FAILED  : mixed = 2

Properties

$iconFactory  : IconFactory
$id  : int
Page id
$import  : Import
$lang  : LanguageService
$moduleTemplate  : ModuleTemplate
$moduleTemplateFactory  : ModuleTemplateFactory
$pageInfo  : array
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()  : File[]
Gets all export files.
getFile()  : File|ProcessedFile|null
Gets a file by combined identifier.
getFilePathWithinFileMountBoundaries()  : string
getLanguageService()  : LanguageService
handleUpload()  : array
Handle upload of an export file
importData()  : array
Import part of module
main()  : void
makeForm()  : void
Create module forms
preprocessInputData()  : array
registerDocHeaderButtons()  : void
Create the panel of buttons for submitting the form or otherwise perform operations.

Constants

UPLOAD_DONE

protected mixed UPLOAD_DONE = 1

UPLOAD_FAILED

protected mixed UPLOAD_FAILED = 2

Properties

$pageInfo

Page record of page id

protected array $pageInfo

$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'

Methods

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

throws
Exception
throws
Exception
throws
RuntimeException

Return values

ResponseInterface

getExportFiles()

Gets all export files.

protected getExportFiles() : File[]

Tags

throws
InvalidArgumentException

Return values

File[]

getFilePathWithinFileMountBoundaries()

protected getFilePathWithinFileMountBoundaries(string $filePath) : string

Parameters

$filePath : string

Return values

string

handleUpload()

Handle upload of an export file

protected handleUpload(ServerRequestInterface $request, array $inData) : array

Parameters

$request : ServerRequestInterface
$inData : array

Tags

throws
Exception
throws
Exception

Return values

array —

Modified data

importData()

Import part of module

protected importData(array $inData) : array

Parameters

$inData : array

Tags

throws
BadFunctionCallException
throws
InvalidArgumentException
throws
RuntimeException

Return values

array —

Modified data

makeForm()

Create module forms

protected makeForm() : void

preprocessInputData()

protected preprocessInputData(array $inData) : array

Parameters

$inData : array

Return values

array

registerDocHeaderButtons()

Create the panel of buttons for submitting the form or otherwise perform operations.

protected registerDocHeaderButtons() : void
On this page