‪TYPO3CMS  11.5
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='')
 
string getFileadminFolderName ()
 
string getOrCreateTemporaryFolderName ()
 
 removeTemporaryFolderName ()
 
Folder null getOrCreateDefaultImportExportFolder ()
 
 removeDefaultImportExportFolder ()
 
 hasErrors ()
 
int getPid ()
 
 setPid (int $pid)
 
 setExcludeDisabledRecords (bool $excludeDisabledRecords)
 
bool isExcludeDisabledRecords ()
 
array getExcludeMap ()
 
 setExcludeMap (array $excludeMap)
 
array getSoftrefCfg ()
 
 setSoftrefCfg (array $softrefCfg)
 
array getExtensionDependencies ()
 
 setExtensionDependencies (array $extensionDependencies)
 
bool isShowStaticRelations ()
 
 setShowStaticRelations (bool $showStaticRelations)
 
array getRelStaticTables ()
 
 setRelStaticTables (array $relStaticTables)
 
array getErrorLog ()
 
 setErrorLog (array $errorLog)
 
bool isUpdate ()
 
 setUpdate (bool $update)
 
array getImportMode ()
 
 setImportMode (array $importMode)
 
bool isGlobalIgnorePid ()
 
 setGlobalIgnorePid (bool $globalIgnorePid)
 
bool isForceAllUids ()
 
 setForceAllUids (bool $forceAllUids)
 
bool isShowDiff ()
 
 setShowDiff (bool $showDiff)
 
array getSoftrefInputValues ()
 
 setSoftrefInputValues (array $softrefInputValues)
 
string getMode ()
 
 setMode (string $mode)
 
array getImportMapId ()
 
 setImportMapId (array $importMapId)
 
array 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)
 
BackendUserAuthentication getBackendUser ()
 
LanguageService getLanguageService ()
 
array null 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 44 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 687 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 456 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()

◆ addRelations()

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

Add database relations of a record to the preview

Parameters
array$relations‪Array of relations
array$lines‪Output lines array
int$indent‪Indentation level
array$recursionCheck‪Recursion check stack
See also
addRecord()

Definition at line 606 of file ImportExport.php.

References TYPO3\CMS\Impexp\ImportExport\getRecordFromDatabase(), TYPO3\CMS\Impexp\ImportExport\getRecordPath(), TYPO3\CMS\Impexp\ImportExport\isRecordExcluded(), TYPO3\CMS\Impexp\ImportExport\isSoftRefIncluded(), TYPO3\CMS\Impexp\ImportExport\isTableStatic(), TYPO3\CMS\Impexp\ImportExport\renderIndent(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

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

◆ 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 900 of file ImportExport.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

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 1335 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 1186 of file ImportExport.php.

◆ createTemporaryFolderName()

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

Definition at line 1145 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 382 of file ImportExport.php.

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 251 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 1246 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()

array TYPO3\CMS\Impexp\ImportExport::getDat ( )
Returns
‪array

Definition at line 1771 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 1409 of file ImportExport.php.

◆ getErrorLog()

array TYPO3\CMS\Impexp\ImportExport::getErrorLog ( )
Returns
‪array

Definition at line 1627 of file ImportExport.php.

◆ getExcludeMap()

array TYPO3\CMS\Impexp\ImportExport::getExcludeMap ( )
Returns
‪array

Definition at line 1547 of file ImportExport.php.

◆ getExtensionDependencies()

array TYPO3\CMS\Impexp\ImportExport::getExtensionDependencies ( )
Returns
‪array

Definition at line 1579 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 1422 of file ImportExport.php.

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

◆ getImportMapId()

array TYPO3\CMS\Impexp\ImportExport::getImportMapId ( )
Returns
‪array

Definition at line 1755 of file ImportExport.php.

◆ getImportMode()

array TYPO3\CMS\Impexp\ImportExport::getImportMode ( )
Returns
‪array

Definition at line 1659 of file ImportExport.php.

◆ getLanguageService()

LanguageService TYPO3\CMS\Impexp\ImportExport::getLanguageService ( )
protected
Returns
‪LanguageService

Definition at line 1474 of file ImportExport.php.

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

◆ getMode()

string TYPO3\CMS\Impexp\ImportExport::getMode ( )
Returns
‪string

Definition at line 1739 of file ImportExport.php.

◆ getOrCreateDefaultImportExportFolder()

Folder null 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.

Returns
‪Folder|null

Definition at line 1174 of file ImportExport.php.

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

◆ getOrCreateTemporaryFolderName()

◆ getPid()

int TYPO3\CMS\Impexp\ImportExport::getPid ( )
Returns
‪int

Definition at line 1486 of file ImportExport.php.

◆ getPidRecord()

array null 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.

Returns
‪array|null

Definition at line 1509 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 1306 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 1317 of file ImportExport.php.

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

◆ getRelStaticTables()

array TYPO3\CMS\Impexp\ImportExport::getRelStaticTables ( )
Returns
‪array

Definition at line 1611 of file ImportExport.php.

◆ getSoftrefCfg()

array TYPO3\CMS\Impexp\ImportExport::getSoftrefCfg ( )
Returns
‪array

Definition at line 1563 of file ImportExport.php.

◆ getSoftrefInputValues()

array TYPO3\CMS\Impexp\ImportExport::getSoftrefInputValues ( )
Returns
‪array

Definition at line 1723 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 1436 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()

bool TYPO3\CMS\Impexp\ImportExport::isExcludeDisabledRecords ( )
Returns
‪bool

Definition at line 1539 of file ImportExport.php.

◆ isForceAllUids()

bool TYPO3\CMS\Impexp\ImportExport::isForceAllUids ( )
Returns
‪bool

Definition at line 1691 of file ImportExport.php.

◆ isGlobalIgnorePid()

bool TYPO3\CMS\Impexp\ImportExport::isGlobalIgnorePid ( )
Returns
‪bool

Definition at line 1675 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 369 of file ImportExport.php.

References $GLOBALS.

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 1281 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()

bool TYPO3\CMS\Impexp\ImportExport::isShowDiff ( )
Returns
‪bool

Definition at line 1707 of file ImportExport.php.

◆ isShowStaticRelations()

bool TYPO3\CMS\Impexp\ImportExport::isShowStaticRelations ( )
Returns
‪bool

Definition at line 1595 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 1292 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 1264 of file ImportExport.php.

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

◆ isUpdate()

bool TYPO3\CMS\Impexp\ImportExport::isUpdate ( )
Returns
‪bool

Definition at line 1643 of file ImportExport.php.

◆ removeDefaultImportExportFolder()

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

Definition at line 1202 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 916 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 1049 of file ImportExport.php.

References 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 939 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 1082 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 986 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 956 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 1219 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)
Parameters
array$errorLog

Definition at line 1635 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 1531 of file ImportExport.php.

◆ setExcludeMap()

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

Definition at line 1555 of file ImportExport.php.

◆ setExtensionDependencies()

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

Definition at line 1587 of file ImportExport.php.

◆ setForceAllUids()

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

Definition at line 1699 of file ImportExport.php.

◆ setGlobalIgnorePid()

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

Definition at line 1683 of file ImportExport.php.

◆ setImportMapId()

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

Definition at line 1763 of file ImportExport.php.

◆ setImportMode()

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

Definition at line 1667 of file ImportExport.php.

◆ setMode()

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

Definition at line 1747 of file ImportExport.php.

◆ setPid()

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

◆ setRelStaticTables()

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

Definition at line 1619 of file ImportExport.php.

◆ setShowDiff()

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

Definition at line 1715 of file ImportExport.php.

◆ setShowStaticRelations()

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

Definition at line 1603 of file ImportExport.php.

◆ setSoftrefCfg()

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

Definition at line 1571 of file ImportExport.php.

◆ setSoftrefInputValues()

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

Definition at line 1731 of file ImportExport.php.

◆ setUpdate()

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

Definition at line 1651 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 439 of file ImportExport.php.

References 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 413 of file ImportExport.php.

References 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 331 of file ImportExport.php.

References 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 165 of file ImportExport.php.

◆ $dat

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

Internal import/export memory

Definition at line 171 of file ImportExport.php.

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

◆ $defaultImportExportFolder

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

Definition at line 202 of file ImportExport.php.

◆ $defaultStorage

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

Currently registered default storage object

Definition at line 226 of file ImportExport.php.

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

◆ $diffUtility

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

Definition at line 181 of file ImportExport.php.

◆ $doesImport

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

Set by importData() when an import is started.

Definition at line 85 of file ImportExport.php.

◆ $errorLog

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

Error log.

Definition at line 159 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 209 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 135 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 147 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 199 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 122 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 104 of file ImportExport.php.

◆ $globalIgnorePid

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

If set, PID correct is ignored globally

Definition at line 98 of file ImportExport.php.

◆ $iconFactory

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

Definition at line 193 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 153 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 92 of file ImportExport.php.

◆ $lang

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

Definition at line 189 of file ImportExport.php.

◆ $mode

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

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

Definition at line 50 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 56 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 67 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 129 of file ImportExport.php.

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

◆ $remainHeader

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

Definition at line 185 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 110 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 73 of file ImportExport.php.

◆ $softrefCfg

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

Soft reference token ID modes.

Definition at line 141 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 116 of file ImportExport.php.

◆ $storageRepository

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

Definition at line 230 of file ImportExport.php.

◆ $storages

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

Array of currently registered storage objects

Definition at line 215 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 221 of file ImportExport.php.

◆ $temporaryFolderName

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

Definition at line 201 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 79 of file ImportExport.php.

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