‪TYPO3CMS  ‪main
TYPO3\CMS\Impexp\ImportExport Class Reference
Inheritance diagram for TYPO3\CMS\Impexp\ImportExport:
TYPO3\CMS\Impexp\Export TYPO3\CMS\Impexp\Import

Public Member Functions

 __construct ()
 
array renderPreview ()
 
 addFiles (array $relations, array &$lines, int $indent, string $tokenID='')
 
 getFileadminFolderName ()
 
 getOrCreateTemporaryFolderName ()
 
 removeTemporaryFolderName ()
 
 getOrCreateDefaultImportExportFolder ()
 
 removeDefaultImportExportFolder ()
 
 hasErrors ()
 
 getPid ()
 
 setPid (int $pid)
 
 setExcludeDisabledRecords (bool $excludeDisabledRecords)
 
 isExcludeDisabledRecords ()
 
 getExcludeMap ()
 
 setExcludeMap (array $excludeMap)
 
 getSoftrefCfg ()
 
 setSoftrefCfg (array $softrefCfg)
 
 getExtensionDependencies ()
 
 setExtensionDependencies (array $extensionDependencies)
 
 isShowStaticRelations ()
 
 setShowStaticRelations (bool $showStaticRelations)
 
 getRelStaticTables ()
 
 setRelStaticTables (array $relStaticTables)
 
 getErrorLog ()
 
 setErrorLog (array $errorLog)
 
 isUpdate ()
 
 setUpdate (bool $update)
 
 getImportMode ()
 
 setImportMode (array $importMode)
 
 isGlobalIgnorePid ()
 
 setGlobalIgnorePid (bool $globalIgnorePid)
 
 isForceAllUids ()
 
 setForceAllUids (bool $forceAllUids)
 
 isShowDiff ()
 
 setShowDiff (bool $showDiff)
 
 getSoftrefInputValues ()
 
 setSoftrefInputValues (array $softrefInputValues)
 
 getMode ()
 
 setMode (string $mode)
 
 getImportMapId ()
 
 setImportMapId (array $importMapId)
 
 getDat ()
 

Protected Member Functions

 fetchStorages ()
 
 traversePageTree (array $pageTree, array &$lines, int $indent=0)
 
bool isRecordDisabled (string $table, int $uid)
 
 excludePageAndRecords (int $pageUid, array $page)
 
 traversePageRecords (array $pageTree, array &$lines)
 
 traverseAllRecords (array $pageTree, array &$lines)
 
 addGeneralErrorsByTable (string $table)
 
 addRecord (string $table, int $uid, array &$lines, int $indent, bool $checkImportInPidRecord=false)
 
 addRelations (array $relations, array &$lines, int $indent, array $recursionCheck=[])
 
 addSoftRefs (array $softrefs, array &$lines, int $indent)
 
 renderIndent (int $indent)
 
bool checkDokType (string $table, int $dokType)
 
string renderControls (array $line)
 
string renderRecordExcludeCheckbox (string $recordRef)
 
string renderSoftRefImportTextField (array $softref)
 
string renderSoftRefExportSelector (array $softref)
 
string renderImportModeSelector (string $table, int $uid, bool $doesRecordExist)
 
string renderSelectBox (string $name, string $value, array $options)
 
 createTemporaryFolderName ()
 
 createDefaultImportExportFolder ()
 
string resolveStoragePath (string $dirPrefix, bool $checkAlternatives=true)
 
 flatInversePageTree (array $pageTree, array &$list, int $pid=-1)
 
bool isTableStatic (string $table)
 
bool isRecordExcluded (string $table, int $uid)
 
bool isSoftRefIncluded (string $tokenID)
 
array null getRecordFromDatabase (string $table, int $uid, string $fields='uid, pid')
 
string getRecordPath (int $pid)
 
string compareRecords (array $databaseRecord, array $importRecord, string $table, bool $inverse=false)
 
DiffUtility getDiffUtility ()
 
ExtendedFileUtility getFileProcObj ()
 
StorageRepository getStorageRepository ()
 
 addError (string $message)
 
 getBackendUser ()
 
 getLanguageService ()
 
 getPidRecord ()
 

Protected Attributes

string $mode = ''
 
string $permsClause
 
int $pid = -1
 
array $pidRecord = null
 
bool $showStaticRelations = false
 
bool $update = false
 
bool $doesImport = false
 
array $importMode = array( )
 
bool $globalIgnorePid = false
 
bool $forceAllUids = false
 
bool $showDiff = false
 
array $softrefInputValues = array( )
 
array $fileIdMap = array( )
 
array $relStaticTables = array( )
 
array $excludeMap = array( )
 
array $softrefCfg = array( )
 
array $extensionDependencies = array( )
 
array $importMapId = array( )
 
array $errorLog = array( )
 
array $cacheGetRecordPath = array( )
 
array $dat = array( )
 
ExtendedFileUtility $fileProcObj
 
DiffUtility $diffUtility
 
array $remainHeader = array( )
 
LanguageService $lang
 
IconFactory $iconFactory
 
string $fileadminFolderName = ''
 
string $temporaryFolderName = null
 
Folder $defaultImportExportFolder = null
 
bool $excludeDisabledRecords = false
 
ResourceStorage[] $storages = array( )
 
ResourceStorage[] $storagesAvailableForImport = array( )
 
ResourceStorage $defaultStorage = null
 
StorageRepository $storageRepository
 

Detailed Description

T3D file Import / Export library (TYPO3 Record Document)

This class is not considered part of the public TYPO3 API.

Definition at line 45 of file ImportExport.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ addError()

◆ addFiles()

TYPO3\CMS\Impexp\ImportExport::addFiles ( array  $relations,
array &  $lines,
int  $indent,
string  $tokenID = '' 
)

Add file relations of a record to the preview.

Public access for testing purpose only.

Parameters
array$relations‪Array of file IDs
array$lines‪Output lines array
int$indent‪Indentation level
string$tokenID‪Token ID if this is a soft reference (in which case it only makes sense with a single element in the $relations array!)
See also
addRecord()

Definition at line 688 of file ImportExport.php.

References TYPO3\CMS\Impexp\ImportExport\$fileProcObj, TYPO3\CMS\Impexp\ImportExport\addError(), TYPO3\CMS\Core\Utility\PathUtility\dirname(), TYPO3\CMS\Impexp\ImportExport\getFileProcObj(), TYPO3\CMS\Core\Core\Environment\getPublicPath(), TYPO3\CMS\Impexp\ImportExport\isSoftRefIncluded(), TYPO3\CMS\Impexp\ImportExport\renderIndent(), TYPO3\CMS\Impexp\ImportExport\resolveStoragePath(), TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL, and TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

Referenced by TYPO3\CMS\Impexp\Tests\Functional\ExportTest\addFilesSucceeds(), TYPO3\CMS\Impexp\ImportExport\addRecord(), and TYPO3\CMS\Impexp\ImportExport\addSoftRefs().

◆ addGeneralErrorsByTable()

TYPO3\CMS\Impexp\ImportExport::addGeneralErrorsByTable ( string  $table)
protected

Log general error message for a given table

Parameters
string$table‪database table name

Definition at line 457 of file ImportExport.php.

References TYPO3\CMS\Impexp\ImportExport\addError().

Referenced by TYPO3\CMS\Impexp\ImportExport\traverseAllRecords(), TYPO3\CMS\Impexp\Import\writeRecords(), and TYPO3\CMS\Impexp\Import\writeSysFileRecords().

◆ addRecord()

TYPO3\CMS\Impexp\ImportExport::addRecord ( string  $table,
int  $uid,
array &  $lines,
int  $indent,
bool  $checkImportInPidRecord = false 
)
protected

◆ addRelations()

TYPO3\CMS\Impexp\ImportExport::addRelations ( array  $relations,
array &  $lines,
int  $indent,
array  $recursionCheck = [] 
)
protected

◆ addSoftRefs()

TYPO3\CMS\Impexp\ImportExport::addSoftRefs ( array  $softrefs,
array &  $lines,
int  $indent 
)
protected

◆ checkDokType()

bool TYPO3\CMS\Impexp\ImportExport::checkDokType ( string  $table,
int  $dokType 
)
protected

Verifies that a table is allowed on a certain doktype of a page.

Parameters
string$table‪Table name to check
int$dokType‪Page doktype
Returns
‪bool TRUE if OK

Definition at line 901 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addRecord().

◆ compareRecords()

string TYPO3\CMS\Impexp\ImportExport::compareRecords ( array  $databaseRecord,
array  $importRecord,
string  $table,
bool  $inverse = false 
)
protected

Compares two records, the current database record and the one from the import memory. Will return HTML code to show any differences between them!

Parameters
array$databaseRecord‪Database record, all fields (old values)
array$importRecordImport memory record for the same table/uid, all fields (new values)
string$table‪The table name of the record
bool$inverse‪Inverse the diff view (switch red/green, needed for pre-update difference view)
Returns
‪string HTML

Definition at line 1318 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addRecord().

◆ createDefaultImportExportFolder()

TYPO3\CMS\Impexp\ImportExport::createDefaultImportExportFolder ( )
protected

Creates a \TYPO3\CMS\Core\Resource\Folder object for saving export files to the server and is also used for uploading import files.

Definition at line 1170 of file ImportExport.php.

◆ createTemporaryFolderName()

TYPO3\CMS\Impexp\ImportExport::createTemporaryFolderName ( )
protected

Definition at line 1131 of file ImportExport.php.

◆ excludePageAndRecords()

TYPO3\CMS\Impexp\ImportExport::excludePageAndRecords ( int  $pageUid,
array  $page 
)
protected

Exclude a page, its sub pages (recursively) and records placed in them from this import/export

Parameters
int$pageUid‪Uid of the page to exclude
array$page‪Page array with uid/subrow (from ->dat[header][pagetree])

Definition at line 383 of file ImportExport.php.

References TYPO3\CMS\Webhooks\Message\$uid.

Referenced by TYPO3\CMS\Impexp\ImportExport\traversePageTree().

◆ fetchStorages()

TYPO3\CMS\Impexp\ImportExport::fetchStorages ( )
protected

Fetch all available file storages and index by storage UID

Note: It also creates a default storage record if the database table sys_file_storage is empty, e.g. during tests.

Definition at line 252 of file ImportExport.php.

References TYPO3\CMS\Core\Resource\StorageRepository\findAll(), TYPO3\CMS\Core\Resource\StorageRepository\flush(), and TYPO3\CMS\Impexp\ImportExport\getStorageRepository().

Referenced by TYPO3\CMS\Impexp\ImportExport\__construct(), and TYPO3\CMS\Impexp\Import\writeSysFileStorageRecords().

◆ flatInversePageTree()

TYPO3\CMS\Impexp\ImportExport::flatInversePageTree ( array  $pageTree,
array &  $list,
int  $pid = -1 
)
protected

Recursively flattening the $pageTree array to a one-dimensional array with uid-pid pairs.

Parameters
array$pageTree‪Page tree array
array$list‪List with uid-pid pairs
int$pid‪PID value (internal, don't set from outside)

Definition at line 1229 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\Export\process(), TYPO3\CMS\Impexp\Import\writePages(), TYPO3\CMS\Impexp\Import\writePagesOrder(), and TYPO3\CMS\Impexp\Import\writeRecordsOrder().

◆ getBackendUser()

◆ getDat()

TYPO3\CMS\Impexp\ImportExport::getDat ( )

Definition at line 1646 of file ImportExport.php.

◆ getDiffUtility()

DiffUtility TYPO3\CMS\Impexp\ImportExport::getDiffUtility ( )
protected

Returns string comparing object, initialized only once.

Returns
‪DiffUtility String comparing object

Definition at line 1392 of file ImportExport.php.

◆ getErrorLog()

TYPO3\CMS\Impexp\ImportExport::getErrorLog ( )

Definition at line 1556 of file ImportExport.php.

◆ getExcludeMap()

TYPO3\CMS\Impexp\ImportExport::getExcludeMap ( )

Definition at line 1506 of file ImportExport.php.

◆ getExtensionDependencies()

TYPO3\CMS\Impexp\ImportExport::getExtensionDependencies ( )

Definition at line 1526 of file ImportExport.php.

◆ getFileadminFolderName()

◆ getFileProcObj()

ExtendedFileUtility TYPO3\CMS\Impexp\ImportExport::getFileProcObj ( )
protected

Returns file processing object, initialized only once.

Returns
‪ExtendedFileUtility File processor object

Definition at line 1405 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addFiles(), TYPO3\CMS\Impexp\Import\processSoftReferencesSaveFileCreateRelFile(), and TYPO3\CMS\Impexp\Import\writeFileVerify().

◆ getImportMapId()

TYPO3\CMS\Impexp\ImportExport::getImportMapId ( )

Definition at line 1636 of file ImportExport.php.

◆ getImportMode()

TYPO3\CMS\Impexp\ImportExport::getImportMode ( )

Definition at line 1576 of file ImportExport.php.

◆ getLanguageService()

TYPO3\CMS\Impexp\ImportExport::getLanguageService ( )
protected

Definition at line 1451 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\__construct().

◆ getMode()

TYPO3\CMS\Impexp\ImportExport::getMode ( )

Definition at line 1626 of file ImportExport.php.

◆ getOrCreateDefaultImportExportFolder()

TYPO3\CMS\Impexp\ImportExport::getOrCreateDefaultImportExportFolder ( )

Returns a \TYPO3\CMS\Core\Resource\Folder object for saving export files to the server and is also used for uploading import files.

Definition at line 1158 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\Controller\ImportController\getSelectableFileList(), and TYPO3\CMS\Impexp\Export\saveToFile().

◆ getOrCreateTemporaryFolderName()

◆ getPid()

TYPO3\CMS\Impexp\ImportExport::getPid ( )

Definition at line 1456 of file ImportExport.php.

◆ getPidRecord()

TYPO3\CMS\Impexp\ImportExport::getPidRecord ( )
protected

Return record of root page of import or of export page tree

  • ‪or null if access denied to that page.

If the page is the root of the page tree, add some basic but missing information.

Definition at line 1474 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addRecord().

◆ getRecordFromDatabase()

array null TYPO3\CMS\Impexp\ImportExport::getRecordFromDatabase ( string  $table,
int  $uid,
string  $fields = 'uid,
pid'   
)
protected

Returns given fields of record if it exists.

Parameters
string$table‪Table name
int$uid‪UID of record
string$fields‪Field list to select. Default is "uid,pid"
Returns
‪array|null Result of \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord() which means the record if found, otherwise NULL

Definition at line 1289 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addRecord(), TYPO3\CMS\Impexp\ImportExport\addRelations(), and TYPO3\CMS\Impexp\Import\addSingle().

◆ getRecordPath()

string TYPO3\CMS\Impexp\ImportExport::getRecordPath ( int  $pid)
protected

Returns the page title path of a PID value. Results are cached internally

Parameters
int$pid‪Record PID to check
Returns
‪string The path for the input PID

Definition at line 1300 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addRecord(), and TYPO3\CMS\Impexp\ImportExport\addRelations().

◆ getRelStaticTables()

TYPO3\CMS\Impexp\ImportExport::getRelStaticTables ( )

Definition at line 1546 of file ImportExport.php.

◆ getSoftrefCfg()

TYPO3\CMS\Impexp\ImportExport::getSoftrefCfg ( )

Definition at line 1516 of file ImportExport.php.

◆ getSoftrefInputValues()

TYPO3\CMS\Impexp\ImportExport::getSoftrefInputValues ( )

Definition at line 1616 of file ImportExport.php.

◆ getStorageRepository()

StorageRepository TYPO3\CMS\Impexp\ImportExport::getStorageRepository ( )
protected

Returns storage repository object, initialized only once.

Returns
‪StorageRepository Storage repository object

Definition at line 1419 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\Import\checkImportPrerequisites(), TYPO3\CMS\Impexp\ImportExport\fetchStorages(), and TYPO3\CMS\Impexp\Import\writeSysFileRecords().

◆ hasErrors()

TYPO3\CMS\Impexp\ImportExport::hasErrors ( )

◆ isExcludeDisabledRecords()

TYPO3\CMS\Impexp\ImportExport::isExcludeDisabledRecords ( )

Definition at line 1501 of file ImportExport.php.

◆ isForceAllUids()

TYPO3\CMS\Impexp\ImportExport::isForceAllUids ( )

Definition at line 1596 of file ImportExport.php.

◆ isGlobalIgnorePid()

TYPO3\CMS\Impexp\ImportExport::isGlobalIgnorePid ( )

Definition at line 1586 of file ImportExport.php.

◆ isRecordDisabled()

bool TYPO3\CMS\Impexp\ImportExport::isRecordDisabled ( string  $table,
int  $uid 
)
protected

Test whether a record is disabled (e.g. hidden)

Parameters
string$table‪Name of the records' database table
int$uid‪Database uid of the record
Returns
‪bool true if the record is disabled, false otherwise

Definition at line 370 of file ImportExport.php.

References $GLOBALS, and TYPO3\CMS\Webhooks\Message\$uid.

Referenced by TYPO3\CMS\Impexp\ImportExport\addRecord(), TYPO3\CMS\Impexp\Export\exportAddRecord(), and TYPO3\CMS\Impexp\ImportExport\traversePageTree().

◆ isRecordExcluded()

bool TYPO3\CMS\Impexp\ImportExport::isRecordExcluded ( string  $table,
int  $uid 
)
protected

Returns TRUE if the element should be excluded from import and export.

Parameters
string$table‪Table name
int$uid‪Record UID
Returns
‪bool TRUE, if the record should be excluded

Definition at line 1264 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addRelations(), TYPO3\CMS\Impexp\Export\exportAddRecord(), TYPO3\CMS\Impexp\Export\exportAddRecordsFromRelationsPushRelation(), TYPO3\CMS\Impexp\Import\remapRelationsOfField(), and TYPO3\CMS\Impexp\Export\removeExcludedPagesFromPageTree().

◆ isShowDiff()

TYPO3\CMS\Impexp\ImportExport::isShowDiff ( )

Definition at line 1606 of file ImportExport.php.

◆ isShowStaticRelations()

TYPO3\CMS\Impexp\ImportExport::isShowStaticRelations ( )

Definition at line 1536 of file ImportExport.php.

◆ isSoftRefIncluded()

bool TYPO3\CMS\Impexp\ImportExport::isSoftRefIncluded ( string  $tokenID)
protected

Returns TRUE if the soft reference should be included in export.

Parameters
string$tokenID‪Token ID for soft reference
Returns
‪bool TRUE, if soft reference should be included

Definition at line 1275 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addFiles(), TYPO3\CMS\Impexp\ImportExport\addRelations(), TYPO3\CMS\Impexp\Export\exportAddFilesFromRelations(), TYPO3\CMS\Impexp\Export\exportAddRecordsFromRelations(), and TYPO3\CMS\Impexp\Export\exportAddRecordsFromRelationsPushRelation().

◆ isTableStatic()

bool TYPO3\CMS\Impexp\ImportExport::isTableStatic ( string  $table)
protected

Returns TRUE if the input table name is to be regarded as a static relation (that is, not exported etc).

Parameters
string$table‪Table name
Returns
‪bool TRUE, if table is marked static

Definition at line 1247 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addRelations(), TYPO3\CMS\Impexp\Export\exportAddRecordsFromRelationsPushRelation(), and TYPO3\CMS\Impexp\Import\remapRelationsOfField().

◆ isUpdate()

TYPO3\CMS\Impexp\ImportExport::isUpdate ( )

Definition at line 1566 of file ImportExport.php.

◆ removeDefaultImportExportFolder()

TYPO3\CMS\Impexp\ImportExport::removeDefaultImportExportFolder ( )

Definition at line 1185 of file ImportExport.php.

◆ removeTemporaryFolderName()

TYPO3\CMS\Impexp\ImportExport::removeTemporaryFolderName ( )

◆ renderControls()

string TYPO3\CMS\Impexp\ImportExport::renderControls ( array  $line)
protected

Render input controls for import or export

Parameters
array$line‪Output line array
Returns
‪string HTML

Definition at line 912 of file ImportExport.php.

References TYPO3\CMS\Impexp\ImportExport\renderRecordExcludeCheckbox(), TYPO3\CMS\Impexp\ImportExport\renderSoftRefExportSelector(), and TYPO3\CMS\Impexp\ImportExport\renderSoftRefImportTextField().

Referenced by TYPO3\CMS\Impexp\ImportExport\renderPreview().

◆ renderImportModeSelector()

string TYPO3\CMS\Impexp\ImportExport::renderImportModeSelector ( string  $table,
int  $uid,
bool  $doesRecordExist 
)
protected

Render select box with import options for the record.

Parameters
string$table‪Table name
int$uid‪Record UID
bool$doesRecordExist‪Is there already a record with this UID in the database?
Returns
‪string HTML

Definition at line 1045 of file ImportExport.php.

References TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Impexp\ImportExport\getBackendUser(), TYPO3\CMS\Impexp\Import\IMPORT_MODE_AS_NEW, TYPO3\CMS\Impexp\Import\IMPORT_MODE_EXCLUDE, TYPO3\CMS\Impexp\Import\IMPORT_MODE_FORCE_UID, TYPO3\CMS\Impexp\Import\IMPORT_MODE_IGNORE_PID, TYPO3\CMS\Impexp\Import\IMPORT_MODE_RESPECT_PID, and TYPO3\CMS\Impexp\ImportExport\renderSelectBox().

Referenced by TYPO3\CMS\Impexp\ImportExport\addRecord().

◆ renderIndent()

TYPO3\CMS\Impexp\ImportExport::renderIndent ( int  $indent)
protected

◆ renderPreview()

◆ renderRecordExcludeCheckbox()

string TYPO3\CMS\Impexp\ImportExport::renderRecordExcludeCheckbox ( string  $recordRef)
protected

Render check box for exclusion of a record from export.

Parameters
string$recordRef‪The record ID of the form [table]:[id].
Returns
‪string HTML

Definition at line 935 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\renderControls().

◆ renderSelectBox()

string TYPO3\CMS\Impexp\ImportExport::renderSelectBox ( string  $name,
string  $value,
array  $options 
)
protected

Renders a select box from option values.

Parameters
string$nameForm element name
string$value‪Current value
array$options‪Options to display (key/value pairs)
Returns
‪string HTML

Definition at line 1078 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\renderImportModeSelector(), and TYPO3\CMS\Impexp\ImportExport\renderSoftRefExportSelector().

◆ renderSoftRefExportSelector()

string TYPO3\CMS\Impexp\ImportExport::renderSoftRefExportSelector ( array  $softref)
protected

Render select box with export options for soft references. An export box is shown only if a substitution scheme is found for the soft reference.

Parameters
array$softref‪Soft reference
Returns
‪string HTML

Definition at line 982 of file ImportExport.php.

References TYPO3\CMS\Impexp\ImportExport\renderSelectBox(), TYPO3\CMS\Impexp\Import\SOFTREF_IMPORT_MODE_EDITABLE, and TYPO3\CMS\Impexp\Import\SOFTREF_IMPORT_MODE_EXCLUDE.

Referenced by TYPO3\CMS\Impexp\ImportExport\renderControls().

◆ renderSoftRefImportTextField()

string TYPO3\CMS\Impexp\ImportExport::renderSoftRefImportTextField ( array  $softref)
protected

Render text field when importing a soft reference.

Parameters
array$softref‪Soft reference
Returns
‪string HTML

Definition at line 952 of file ImportExport.php.

References TYPO3\CMS\Impexp\Import\SOFTREF_IMPORT_MODE_EDITABLE.

Referenced by TYPO3\CMS\Impexp\ImportExport\renderControls().

◆ resolveStoragePath()

string TYPO3\CMS\Impexp\ImportExport::resolveStoragePath ( string  $dirPrefix,
bool  $checkAlternatives = true 
)
protected

Checks if the input path relative to the public web path can be found in the file mounts of the backend user. If not, it checks all file mounts of the user for the relative path and returns it if found.

Parameters
string$dirPrefix‪Path relative to public web path.
bool$checkAlternatives‪If set to false, do not look for an alternative path.
Returns
‪string If a path is available, it will be returned, otherwise NULL.
Exceptions

Definition at line 1202 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addFiles(), and TYPO3\CMS\Impexp\Import\processSoftReferencesSaveFileCreateRelFile().

◆ setErrorLog()

TYPO3\CMS\Impexp\ImportExport::setErrorLog ( array  $errorLog)

Definition at line 1561 of file ImportExport.php.

◆ setExcludeDisabledRecords()

TYPO3\CMS\Impexp\ImportExport::setExcludeDisabledRecords ( bool  $excludeDisabledRecords)

Set flag to control whether disabled records and their children are excluded (true) or included (false). Defaults to the old behaviour of including everything.

Parameters
bool$excludeDisabledRecords‪Set to true if if all disabled records should be excluded, false otherwise

Definition at line 1496 of file ImportExport.php.

◆ setExcludeMap()

TYPO3\CMS\Impexp\ImportExport::setExcludeMap ( array  $excludeMap)

Definition at line 1511 of file ImportExport.php.

◆ setExtensionDependencies()

TYPO3\CMS\Impexp\ImportExport::setExtensionDependencies ( array  $extensionDependencies)

Definition at line 1531 of file ImportExport.php.

◆ setForceAllUids()

TYPO3\CMS\Impexp\ImportExport::setForceAllUids ( bool  $forceAllUids)

Definition at line 1601 of file ImportExport.php.

◆ setGlobalIgnorePid()

TYPO3\CMS\Impexp\ImportExport::setGlobalIgnorePid ( bool  $globalIgnorePid)

Definition at line 1591 of file ImportExport.php.

◆ setImportMapId()

TYPO3\CMS\Impexp\ImportExport::setImportMapId ( array  $importMapId)

Definition at line 1641 of file ImportExport.php.

◆ setImportMode()

TYPO3\CMS\Impexp\ImportExport::setImportMode ( array  $importMode)

Definition at line 1581 of file ImportExport.php.

◆ setMode()

TYPO3\CMS\Impexp\ImportExport::setMode ( string  $mode)

Definition at line 1631 of file ImportExport.php.

◆ setPid()

TYPO3\CMS\Impexp\ImportExport::setPid ( int  $pid)

◆ setRelStaticTables()

TYPO3\CMS\Impexp\ImportExport::setRelStaticTables ( array  $relStaticTables)

Definition at line 1551 of file ImportExport.php.

◆ setShowDiff()

TYPO3\CMS\Impexp\ImportExport::setShowDiff ( bool  $showDiff)

Definition at line 1611 of file ImportExport.php.

◆ setShowStaticRelations()

TYPO3\CMS\Impexp\ImportExport::setShowStaticRelations ( bool  $showStaticRelations)

Definition at line 1541 of file ImportExport.php.

◆ setSoftrefCfg()

TYPO3\CMS\Impexp\ImportExport::setSoftrefCfg ( array  $softrefCfg)

Definition at line 1521 of file ImportExport.php.

◆ setSoftrefInputValues()

TYPO3\CMS\Impexp\ImportExport::setSoftrefInputValues ( array  $softrefInputValues)

Definition at line 1621 of file ImportExport.php.

◆ setUpdate()

TYPO3\CMS\Impexp\ImportExport::setUpdate ( bool  $update)

Definition at line 1571 of file ImportExport.php.

◆ traverseAllRecords()

TYPO3\CMS\Impexp\ImportExport::traverseAllRecords ( array  $pageTree,
array &  $lines 
)
protected

Go through ALL records (if the pages are displayed first, those will not be among these!)

Parameters
array$pageTree‪Page tree array with uid/subrow (from ->dat[header][pagetree])
array$lines‪Output lines array

Definition at line 440 of file ImportExport.php.

References TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Impexp\ImportExport\addGeneralErrorsByTable(), and TYPO3\CMS\Impexp\ImportExport\addRecord().

Referenced by TYPO3\CMS\Impexp\ImportExport\renderPreview().

◆ traversePageRecords()

TYPO3\CMS\Impexp\ImportExport::traversePageRecords ( array  $pageTree,
array &  $lines 
)
protected

Go through remaining pages (not in tree)

Parameters
array<int,array>‪$pageTree Page tree array with uid/subrow (from ->dat[header][pagetree])
array$lines‪Output lines array

Definition at line 414 of file ImportExport.php.

References TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Impexp\ImportExport\addRecord().

Referenced by TYPO3\CMS\Impexp\ImportExport\renderPreview().

◆ traversePageTree()

TYPO3\CMS\Impexp\ImportExport::traversePageTree ( array  $pageTree,
array &  $lines,
int  $indent = 0 
)
protected

Go through page tree for display

Parameters
array<int,array>‪$pageTree Page tree array with uid/subrow (from ->dat[header][pagetree])
array$lines‪Output lines array
int$indent‪Indentation level

Definition at line 332 of file ImportExport.php.

References TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Impexp\ImportExport\addRecord(), TYPO3\CMS\Impexp\ImportExport\excludePageAndRecords(), and TYPO3\CMS\Impexp\ImportExport\isRecordDisabled().

Referenced by TYPO3\CMS\Impexp\ImportExport\renderPreview().

Member Data Documentation

◆ $cacheGetRecordPath

array TYPO3\CMS\Impexp\ImportExport::$cacheGetRecordPath = array( )
protected

Cache for record paths

Definition at line 166 of file ImportExport.php.

◆ $dat

array TYPO3\CMS\Impexp\ImportExport::$dat = array( )
protected

Internal import/export memory

Definition at line 172 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\Import\loadFile().

◆ $defaultImportExportFolder

Folder TYPO3\CMS\Impexp\ImportExport::$defaultImportExportFolder = null
protected

Definition at line 203 of file ImportExport.php.

◆ $defaultStorage

ResourceStorage TYPO3\CMS\Impexp\ImportExport::$defaultStorage = null
protected

Currently registered default storage object

Definition at line 227 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\Import\writeSysFileRecords().

◆ $diffUtility

DiffUtility TYPO3\CMS\Impexp\ImportExport::$diffUtility
protected

Definition at line 182 of file ImportExport.php.

◆ $doesImport

bool TYPO3\CMS\Impexp\ImportExport::$doesImport = false
protected

Set by importData() when an import is started.

Definition at line 86 of file ImportExport.php.

◆ $errorLog

array TYPO3\CMS\Impexp\ImportExport::$errorLog = array( )
protected

Error log.

Definition at line 160 of file ImportExport.php.

◆ $excludeDisabledRecords

bool TYPO3\CMS\Impexp\ImportExport::$excludeDisabledRecords = false
protected

Flag to control whether all disabled records and their children are excluded (true) or included (false). Defaults to the old behaviour of including everything.

Definition at line 210 of file ImportExport.php.

◆ $excludeMap

array TYPO3\CMS\Impexp\ImportExport::$excludeMap = array( )
protected

Exclude map. Keys are table:uid pairs and if set, records are not added to the export.

Definition at line 136 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\Export\setHeaderBasics().

◆ $extensionDependencies

array TYPO3\CMS\Impexp\ImportExport::$extensionDependencies = array( )
protected

Listing extension dependencies.

Definition at line 148 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\Export\setHeaderBasics().

◆ $fileadminFolderName

string TYPO3\CMS\Impexp\ImportExport::$fileadminFolderName = ''
protected

Name of the "fileadmin" folder where files for export/import should be located

Definition at line 200 of file ImportExport.php.

◆ $fileIdMap

array TYPO3\CMS\Impexp\ImportExport::$fileIdMap = array( )
protected

Mapping between the fileID from import memory and the final filenames they are written to.

Definition at line 123 of file ImportExport.php.

◆ $fileProcObj

ExtendedFileUtility TYPO3\CMS\Impexp\ImportExport::$fileProcObj
protected

◆ $forceAllUids

bool TYPO3\CMS\Impexp\ImportExport::$forceAllUids = false
protected

If set, all UID values are forced! (update or import)

Definition at line 105 of file ImportExport.php.

◆ $globalIgnorePid

bool TYPO3\CMS\Impexp\ImportExport::$globalIgnorePid = false
protected

If set, PID correct is ignored globally

Definition at line 99 of file ImportExport.php.

◆ $iconFactory

IconFactory TYPO3\CMS\Impexp\ImportExport::$iconFactory
protected

Definition at line 194 of file ImportExport.php.

◆ $importMapId

array TYPO3\CMS\Impexp\ImportExport::$importMapId = array( )
protected

After records are written this array is filled with [table][original_uid] = [new_uid]

Definition at line 154 of file ImportExport.php.

◆ $importMode

array TYPO3\CMS\Impexp\ImportExport::$importMode = array( )
protected

Setting the import mode for specific import records. Available options are: force_uid, as_new, exclude, ignore_pid, respect_pid

Definition at line 93 of file ImportExport.php.

◆ $lang

LanguageService TYPO3\CMS\Impexp\ImportExport::$lang
protected

Definition at line 190 of file ImportExport.php.

◆ $mode

string TYPO3\CMS\Impexp\ImportExport::$mode = ''
protected

Whether "import" or "export" mode of object.

Definition at line 51 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addSoftRefs().

◆ $permsClause

string TYPO3\CMS\Impexp\ImportExport::$permsClause
protected

A WHERE clause for selection records from the pages table based on read-permissions of the current backend user.

Definition at line 57 of file ImportExport.php.

◆ $pid

◆ $pidRecord

array TYPO3\CMS\Impexp\ImportExport::$pidRecord = null
protected

Root page record of import or of export page tree

Definition at line 68 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\addRecord().

◆ $relStaticTables

array TYPO3\CMS\Impexp\ImportExport::$relStaticTables = array( )
protected

Add tables names here which should not be exported with the file. (Where relations should be mapped to same UIDs in target system).

Definition at line 130 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\Export\setHeaderBasics().

◆ $remainHeader

array TYPO3\CMS\Impexp\ImportExport::$remainHeader = array( )
protected

Definition at line 186 of file ImportExport.php.

◆ $showDiff

bool TYPO3\CMS\Impexp\ImportExport::$showDiff = false
protected

If set, a diff-view column is added to the preview.

Definition at line 111 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\renderPreview().

◆ $showStaticRelations

bool TYPO3\CMS\Impexp\ImportExport::$showStaticRelations = false
protected

If set, static relations (not exported) will be shown in preview as well

Definition at line 74 of file ImportExport.php.

◆ $softrefCfg

array TYPO3\CMS\Impexp\ImportExport::$softrefCfg = array( )
protected

Soft reference token ID modes.

Definition at line 142 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\Export\setHeaderBasics().

◆ $softrefInputValues

array TYPO3\CMS\Impexp\ImportExport::$softrefInputValues = array( )
protected

Array of values to substitute in editable soft references.

Definition at line 117 of file ImportExport.php.

◆ $storageRepository

StorageRepository TYPO3\CMS\Impexp\ImportExport::$storageRepository
protected

Definition at line 231 of file ImportExport.php.

◆ $storages

ResourceStorage [] TYPO3\CMS\Impexp\ImportExport::$storages = array( )
protected

Array of currently registered storage objects

Definition at line 216 of file ImportExport.php.

◆ $storagesAvailableForImport

ResourceStorage [] TYPO3\CMS\Impexp\ImportExport::$storagesAvailableForImport = array( )
protected

Array of currently registered storage objects available for importing files to

Definition at line 222 of file ImportExport.php.

◆ $temporaryFolderName

string TYPO3\CMS\Impexp\ImportExport::$temporaryFolderName = null
protected

Definition at line 202 of file ImportExport.php.

◆ $update

bool TYPO3\CMS\Impexp\ImportExport::$update = false
protected

Updates all records that has same UID instead of creating new!

Definition at line 80 of file ImportExport.php.

Referenced by TYPO3\CMS\Impexp\ImportExport\renderPreview().