ImportController extends ImportExportController

Main script class for the Import facility

Internal

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

UPLOAD_DONE

protected mixed UPLOAD_DONE = 1

UPLOAD_FAILED

protected mixed UPLOAD_FAILED = 2

Properties

$pageInfo

Page record of page id

protected array<string|int, mixed> $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() : array<string|int, File>
Tags
throws
InvalidArgumentException
Return values
array<string|int, 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<string|int, mixed> $inData) : array<string|int, mixed>
Parameters
$request : ServerRequestInterface
$inData : array<string|int, mixed>
Tags
throws
Exception
throws
Exception
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
throws
BadFunctionCallException
throws
InvalidArgumentException
throws
RuntimeException
Return values
array<string|int, mixed>

Modified data

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

        
On this page

Search results