TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Impexp\Controller\ImportExportController Class Reference
Inheritance diagram for TYPO3\CMS\Impexp\Controller\ImportExportController:
TYPO3\CMS\Backend\Module\BaseScriptClass

Public Member Functions

 __construct ()
 
 init ()
 
 main ()
 
 printContent ()
 
 mainAction (ServerRequestInterface $request, ResponseInterface $response)
 
 addRecordsForPid ($k, $tables, $maxNumber)
 
 makeConfigurationForm ($inData)
 
 makeAdvancedOptionsForm ($inData)
 
 makeSaveForm ($inData)
 
 checkUpload ()
 
 getTableSelectOptions ($excludeList='')
 
 filterPageIds ($exclude)
 
- Public Member Functions inherited from TYPO3\CMS\Backend\Module\BaseScriptClass
 init ()
 
 menuConfig ()
 
 mergeExternalItems ($modName, $menuKey, $menuArr)
 
 handleExternalFunctionValue ($MM_key='function', $MS_value=null)
 
 getExternalItemConfig ($modName, $menuKey, $value='')
 
 checkExtObj ()
 
 checkSubExtObj ()
 
 extObjHeader ()
 

Public Attributes

 $pageinfo
 
- Public Attributes inherited from TYPO3\CMS\Backend\Module\BaseScriptClass
 $MCONF = []
 
 $id
 
 $CMD
 
 $perms_clause
 
 $MOD_MENU
 
 $MOD_SETTINGS = []
 
 $modTSconfig
 
 $modMenu_type = ''
 
 $modMenu_dontValidateList = ''
 
 $modMenu_setDefaultList = ''
 
 $extClassConf
 
 $content = ''
 
 $doc
 
 $extObj
 

Protected Member Functions

 getButtons ()
 
 getDefaultImportExportFolder ()
 
 getBackendUser ()
 
 getDatabaseConnection ()
 
 getLanguageService ()
 
 getFile ($combinedIdentifier)
 
- Protected Member Functions inherited from TYPO3\CMS\Backend\Module\BaseScriptClass
 getLanguageService ()
 
 getBackendUser ()
 
 getDatabaseConnection ()
 
 getPageRenderer ()
 

Protected Attributes

 $uploadedFiles = []
 
 $export
 
 $import
 
 $fileProcessor
 
 $vC = ''
 
 $lang = null
 
 $treeHTML = ''
 
 $iconFactory
 
 $moduleName = 'xMOD_tximpexp'
 
 $moduleTemplate
 
 $shortcutName
 
 $presetRepository
 
 $standaloneView = null
 
- Protected Attributes inherited from TYPO3\CMS\Backend\Module\BaseScriptClass
 $pageRenderer = null
 

Detailed Description

Main script class for the Import / Export facility

Definition at line 47 of file ImportExportController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Impexp\Controller\ImportExportController::__construct ( )

Member Function Documentation

◆ addRecordsForPid()

TYPO3\CMS\Impexp\Controller\ImportExportController::addRecordsForPid (   $k,
  $tables,
  $maxNumber 
)

◆ checkUpload()

◆ filterPageIds()

TYPO3\CMS\Impexp\Controller\ImportExportController::filterPageIds (   $exclude)

Filter page IDs by traversing exclude array, finding all excluded pages (if any) and making an AND NOT IN statement for the select clause.

Parameters
array$excludeExclude array from import/export object.
Returns
string AND where clause part to filter out page uids.

Definition at line 999 of file ImportExportController.php.

References $uid.

Referenced by TYPO3\CMS\Impexp\Controller\ImportExportController\getButtons().

◆ getBackendUser()

◆ getButtons()

TYPO3\CMS\Impexp\Controller\ImportExportController::getButtons ( )
protected

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

Returns
array all available buttons as an associated array

Definition at line 311 of file ImportExportController.php.

References $a, TYPO3\CMS\Impexp\Controller\ImportExportController\$lang, TYPO3\CMS\Core\Utility\GeneralUtility\_GP(), TYPO3\CMS\Impexp\Controller\ImportExportController\addRecordsForPid(), TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine(), TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, TYPO3\CMS\Impexp\Controller\ImportExportController\filterPageIds(), TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Core\Utility\GeneralUtility\formatSize(), TYPO3\CMS\Impexp\Controller\ImportExportController\getBackendUser(), TYPO3\CMS\Impexp\Controller\ImportExportController\getDatabaseConnection(), TYPO3\CMS\Impexp\Controller\ImportExportController\getDefaultImportExportFolder(), TYPO3\CMS\Core\Resource\ResourceFactory\getInstance(), TYPO3\CMS\Impexp\Controller\ImportExportController\getLanguageService(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL(), TYPO3\CMS\Impexp\Controller\ImportExportController\makeAdvancedOptionsForm(), TYPO3\CMS\Impexp\Controller\ImportExportController\makeConfigurationForm(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), TYPO3\CMS\Impexp\Controller\ImportExportController\makeSaveForm(), TYPO3\CMS\Core\Messaging\AbstractMessage\OK, TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL, TYPO3\CMS\Core\Utility\GeneralUtility\tempnam(), and TYPO3\CMS\Backend\Utility\BackendUtility\viewOnClick().

Referenced by TYPO3\CMS\Impexp\Controller\ImportExportController\main().

◆ getDatabaseConnection()

TYPO3\CMS\Impexp\Controller\ImportExportController::getDatabaseConnection ( )
protected

◆ getDefaultImportExportFolder()

TYPO3\CMS\Impexp\Controller\ImportExportController::getDefaultImportExportFolder ( )
protected

◆ getFile()

TYPO3\CMS\Impexp\Controller\ImportExportController::getFile (   $combinedIdentifier)
protected

Gets a file by combined identifier.

Parameters
string$combinedIdentifier
Returns
NULL|

Definition at line 1072 of file ImportExportController.php.

References TYPO3\CMS\Core\Resource\ResourceFactory\getInstance().

Referenced by TYPO3\CMS\Impexp\Controller\ImportExportController\makeSaveForm().

◆ getLanguageService()

◆ getTableSelectOptions()

TYPO3\CMS\Impexp\Controller\ImportExportController::getTableSelectOptions (   $excludeList = '')

Returns option array to be used in Fluid

Parameters
string$excludeListTable names (and the string "_ALL") to exclude. Comma list
Returns
array

Definition at line 978 of file ImportExportController.php.

References $GLOBALS, TYPO3\CMS\Impexp\Controller\ImportExportController\getBackendUser(), and TYPO3\CMS\Core\Utility\GeneralUtility\inList().

Referenced by TYPO3\CMS\Impexp\Controller\ImportExportController\makeConfigurationForm().

◆ init()

◆ main()

◆ mainAction()

TYPO3\CMS\Impexp\Controller\ImportExportController::mainAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

Injects the request object for the current request and gathers all data

IMPORTING DATA:

Incoming array has syntax: GETvar 'id' = import page id (must be readable)

file = (pointing to filename relative to PATH_site)

[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.

EXPORTING DATA:

Incoming array has syntax:

file[] = file dir[] = dir list[] = table:pid record[] = table:uid

pagetree[id] = (single id) pagetree[levels]=1,2,3, -1 = currently unpacked tree, -2 = only tables on page pagetree[tables][]=table/_ALL

external_ref[tables][]=table/_ALL

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

Definition at line 295 of file ImportExportController.php.

References $GLOBALS, TYPO3\CMS\Impexp\Controller\ImportExportController\init(), and TYPO3\CMS\Impexp\Controller\ImportExportController\main().

◆ makeAdvancedOptionsForm()

TYPO3\CMS\Impexp\Controller\ImportExportController::makeAdvancedOptionsForm (   $inData)

Create advanced options form Sets content in $this->content

Parameters
array$inDataForm configurat data
Returns
void

Definition at line 746 of file ImportExportController.php.

References TYPO3\CMS\Core\Utility\ExtensionManagementUtility\getLoadedExtensionListArray().

Referenced by TYPO3\CMS\Impexp\Controller\ImportExportController\getButtons().

◆ makeConfigurationForm()

◆ makeSaveForm()

◆ printContent()

TYPO3\CMS\Impexp\Controller\ImportExportController::printContent ( )

Print the content

Returns
void
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 254 of file ImportExportController.php.

References TYPO3\CMS\Backend\Module\BaseScriptClass\$content, and TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction().

Member Data Documentation

◆ $export

TYPO3\CMS\Impexp\Controller\ImportExportController::$export
protected

Definition at line 64 of file ImportExportController.php.

◆ $fileProcessor

TYPO3\CMS\Impexp\Controller\ImportExportController::$fileProcessor
protected

Definition at line 74 of file ImportExportController.php.

◆ $iconFactory

TYPO3\CMS\Impexp\Controller\ImportExportController::$iconFactory
protected

Definition at line 94 of file ImportExportController.php.

◆ $import

TYPO3\CMS\Impexp\Controller\ImportExportController::$import
protected

◆ $lang

TYPO3\CMS\Impexp\Controller\ImportExportController::$lang = null
protected

◆ $moduleName

TYPO3\CMS\Impexp\Controller\ImportExportController::$moduleName = 'xMOD_tximpexp'
protected

◆ $moduleTemplate

TYPO3\CMS\Impexp\Controller\ImportExportController::$moduleTemplate
protected

Definition at line 108 of file ImportExportController.php.

◆ $pageinfo

TYPO3\CMS\Impexp\Controller\ImportExportController::$pageinfo

◆ $presetRepository

TYPO3\CMS\Impexp\Controller\ImportExportController::$presetRepository
protected

Definition at line 122 of file ImportExportController.php.

◆ $shortcutName

TYPO3\CMS\Impexp\Controller\ImportExportController::$shortcutName
protected

Definition at line 115 of file ImportExportController.php.

◆ $standaloneView

TYPO3\CMS\Impexp\Controller\ImportExportController::$standaloneView = null
protected

Definition at line 127 of file ImportExportController.php.

◆ $treeHTML

TYPO3\CMS\Impexp\Controller\ImportExportController::$treeHTML = ''
protected

Definition at line 89 of file ImportExportController.php.

◆ $uploadedFiles

TYPO3\CMS\Impexp\Controller\ImportExportController::$uploadedFiles = []
protected

◆ $vC

TYPO3\CMS\Impexp\Controller\ImportExportController::$vC = ''
protected

Definition at line 79 of file ImportExportController.php.