TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Impexp\Import Class Reference
Inheritance diagram for TYPO3\CMS\Impexp\Import:
TYPO3\CMS\Impexp\ImportExport

Public Member Functions

 init ()
 
 importData ($pid)
 
 checkImportPrerequisites ()
 
 writeRecords_pages ($pid)
 
 writeRecords_pages_order ()
 
 flatInversePageTree_pid ($idH, $a=[], $pid=-1)
 
 writeRecords_records ($pid)
 
 writeRecords_records_order ($mainPid)
 
 addSingle ($table, $uid, $pid)
 
 addToMapId ($substNEWwithIDs)
 
 getNewTCE ()
 
 unlinkTempFiles ()
 
 setRelations ()
 
 setRelations_db ($itemArray, $itemConfig)
 
 import_addFileNameToBeCopied ($fI)
 
 setFlexFormRelations ()
 
 remapListedDBRecords_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2, $path)
 
 processSoftReferences_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2, $path)
 
 processSoftReferences_substTokens ($tokenizedContent, $softRefCfgs, $table, $uid)
 
 processSoftReferences_saveFile ($relFileName, $cfg, $table, $uid)
 
 processSoftReferences_saveFile_createRelFile ($origDirPrefix, $fileName, $fileID, $table, $uid)
 
 writeFileVerify ($fileName, $fileID, $bypassMountCheck=false)
 
 checkOrCreateDir ($dirPrefix)
 
 loadFile ($filename, $all=false)
 
 getNextFilePart ($fd, $unserialize=false, $name='')
 
 loadContent ($filecontent)
 
 getNextContentPart ($filecontent, &$pointer, $unserialize=false, $name='')
 
 loadInit ()
 
 fixCharsets ()
 
- Public Member Functions inherited from TYPO3\CMS\Impexp\ImportExport
 __construct ()
 
 init ()
 
 displayContentOverview ()
 
 traversePageTree ($pT, &$lines, $preCode='')
 
 traversePageRecords ($pT, &$lines)
 
 traverseAllRecords ($pT, &$lines)
 
 singleRecordLines ($table, $uid, &$lines, $preCode, $checkImportInPidRecord=false)
 
 addRelations ($rels, &$lines, $preCode, $recurCheck=[], $htmlColorClass='')
 
 addFiles ($rels, &$lines, $preCode, $htmlColorClass='', $tokenID='')
 
 checkDokType ($checkTable, $doktype)
 
 renderControls ($r)
 
 softrefSelector ($cfg)
 
 verifyFolderAccess ($dirPrefix, $noAlternative=false)
 
 flatInversePageTree ($idH, $a=[])
 
 isTableStatic ($table)
 
 inclRelation ($table)
 
 isExcluded ($table, $uid)
 
 includeSoftref ($tokenID)
 
 checkPID ($pid)
 
 dontIgnorePid ($table, $uid)
 
 doesRecordExist ($table, $uid, $fields='')
 
 getRecordPath ($pid)
 
 renderSelectBox ($prefix, $value, $optValues)
 
 compareRecords ($databaseRecord, $importRecord, $table, $inverseDiff=false)
 
 getRTEoriginalFilename ($string)
 
 getFileProcObj ()
 
 callHook ($name, $params)
 
 error ($msg)
 
 printErrorLog ()
 

Public Attributes

 $suggestedInsertUids = []
 
 $enableLogging = false
 
 $import_newId = []
 
 $import_newId_pids = []
 
 $import_data = []
 
- Public Attributes inherited from TYPO3\CMS\Impexp\ImportExport
 $showStaticRelations = false
 
 $fileadminFolderName = ''
 
 $mode = ''
 
 $update = false
 
 $doesImport = false
 
 $display_import_pid_record = []
 
 $import_mode = []
 
 $global_ignore_pid = false
 
 $force_all_UIDS = false
 
 $showDiff = false
 
 $allowPHPScripts = false
 
 $softrefInputValues = []
 
 $fileIDMap = []
 
 $relOnlyTables = []
 
 $relStaticTables = []
 
 $excludeMap = []
 
 $softrefCfg = []
 
 $extensionDependencies = []
 
 $import_mapId = []
 
 $errorLog = []
 
 $cache_getRecordPath = []
 
 $checkPID_cache = []
 
 $compress = false
 
 $dat = []
 

Protected Member Functions

 initializeImport ()
 
 writeSysFileStorageRecords ()
 
 isEquivalentObjectStorage (ResourceStorage $storageObject, array $storageRecord)
 
 removeSysFileReferenceRecordsFromImportDataWithRelationToMissingFile ()
 
 isFallbackStorage ($storageId)
 
 fixUidLocalInSysFileReferenceRecords ($oldFileUid, $newFileUid)
 
 fetchStorageRecords ()
 
 writeTemporaryFileFromData ($fileId, $dataKey='files_fal')
 
 writeSysFileResourceForLegacyImport (&$fileName, $fileId)
 
 migrateLegacyImportRecords ()
 
- Protected Member Functions inherited from TYPO3\CMS\Impexp\ImportExport
 addGeneralErrorsByTable ($table)
 
 getTemporaryFolderName ()
 
 getBackendUser ()
 
 getDatabaseConnection ()
 
 getLanguageService ()
 

Protected Attributes

 $storageObjects = []
 
 $legacyImport = false
 
 $legacyImportFolder = null
 
 $legacyImportTargetPath = '_imported/'
 
 $legacyImportMigrationTables
 
 $legacyImportMigrationRecords = []
 
 $filesPathForImport = null
 
 $unlinkFiles = []
 
 $alternativeFileName = []
 
 $alternativeFilePath = []
 
 $filePathMap = []
 
- Protected Attributes inherited from TYPO3\CMS\Impexp\ImportExport
 $fileProcObj = null
 
 $remainHeader = []
 
 $iconFactory
 

Detailed Description

T3D file Import library (TYPO3 Record Document)

Definition at line 36 of file Import.php.

Member Function Documentation

◆ addSingle()

TYPO3\CMS\Impexp\Import::addSingle (   $table,
  $uid,
  $pid 
)

Adds a single record to the $importData array. Also copies files to tempfolder. However all File/DB-references and flexform field contents are set to blank for now! That is done with setRelations() later

Parameters
string$tableTable name (from import memory)
int$uidRecord UID (from import memory)
int$pidPage id
Returns
void
See also
writeRecords()

Definition at line 911 of file Import.php.

References $uid, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Impexp\ImportExport\doesRecordExist(), TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Impexp\ImportExport\getBackendUser(), TYPO3\CMS\Impexp\ImportExport\getDatabaseConnection(), and TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

Referenced by TYPO3\CMS\Impexp\Import\writeRecords_pages(), TYPO3\CMS\Impexp\Import\writeRecords_records(), and TYPO3\CMS\Impexp\Import\writeSysFileStorageRecords().

◆ addToMapId()

TYPO3\CMS\Impexp\Import::addToMapId (   $substNEWwithIDs)

Registers the substNEWids in memory.

Parameters
array$substNEWwithIDsFrom tcemain to be merged into internal mapping variable in this object
Returns
void
See also
writeRecords()

Definition at line 1005 of file Import.php.

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

Referenced by TYPO3\CMS\Impexp\Import\writeRecords_pages(), TYPO3\CMS\Impexp\Import\writeRecords_records(), and TYPO3\CMS\Impexp\Import\writeSysFileStorageRecords().

◆ checkImportPrerequisites()

◆ checkOrCreateDir()

TYPO3\CMS\Impexp\Import::checkOrCreateDir (   $dirPrefix)

Returns TRUE if directory exists and if it doesn't it will create directory and return TRUE if that succeeded.

Parameters
string$dirPrefixDirectory to create. Having a trailing slash. Must be in fileadmin/. Relative to PATH_site
Returns
bool TRUE, if directory exists (was created)

Definition at line 1939 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Core\Utility\GeneralUtility\getFileAbsFileName(), and TYPO3\CMS\Core\Utility\GeneralUtility\mkdir().

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

◆ fetchStorageRecords()

TYPO3\CMS\Impexp\Import::fetchStorageRecords ( )
protected

Fetched fresh storage records from database because the new imported ones are not in cached data of the StorageRepository

Returns
bool|array

Definition at line 621 of file Import.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\BEenableFields(), TYPO3\CMS\Backend\Utility\BackendUtility\deleteClause(), and TYPO3\CMS\Impexp\ImportExport\getDatabaseConnection().

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

◆ fixCharsets()

TYPO3\CMS\Impexp\Import::fixCharsets ( )

Fix charset of import memory if different from system charset

Returns
void
See also
loadInit()

Definition at line 2155 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\error(), and TYPO3\CMS\Impexp\ImportExport\getLanguageService().

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

◆ fixUidLocalInSysFileReferenceRecords()

TYPO3\CMS\Impexp\Import::fixUidLocalInSysFileReferenceRecords (   $oldFileUid,
  $newFileUid 
)
protected

Normally the importer works like the following: Step 1: import the records with cleared field values of relation fields (see addSingle()) Step 2: update the records with the right relation ids (see setRelations())

In step 2 the saving fields of type "relation to sys_file_reference" checks the related sys_file_reference record (created in step 1) with the FileExtensionFilter for matching file extensions of the related file. To make this work correct, the uid_local of sys_file_reference records has to be not empty AND has to relate to the correct (imported) sys_file record uid!!!

This is fixed here.

Parameters
int$oldFileUid
int$newFileUid
Returns
void

Definition at line 576 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\error(), and TYPO3\CMS\Impexp\ImportExport\getBackendUser().

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

◆ flatInversePageTree_pid()

TYPO3\CMS\Impexp\Import::flatInversePageTree_pid (   $idH,
  $a = [],
  $pid = -1 
)

Recursively flattening the idH array, setting PIDs as values

Parameters
array$idHPage uid hierarchy
array$aAccumulation array of pages (internal, don't set from outside)
int$pidPID value (internal)
Returns
array Array with uid-pid pairs for all pages in the page tree.
See also
ImportExport::flatInversePageTree()

Definition at line 774 of file Import.php.

References $a.

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

◆ getNewTCE()

◆ getNextContentPart()

TYPO3\CMS\Impexp\Import::getNextContentPart (   $filecontent,
$pointer,
  $unserialize = false,
  $name = '' 
)

Returns the next content part from the $filecontent

Parameters
string$filecontentFile content string
int$pointerFile pointer (where to read from)
bool$unserializeIf set, the returned content is unserialized into an array, otherwise you get the raw string
string$nameFor error messages this indicates the section of the problem.
Returns
string|NULL Data string

Definition at line 2101 of file Import.php.

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

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

◆ getNextFilePart()

TYPO3\CMS\Impexp\Import::getNextFilePart (   $fd,
  $unserialize = false,
  $name = '' 
)

Returns the next content part form the fileresource (t3d), $fd

Parameters
resource$fdFile pointer
bool$unserializeIf set, the returned content is unserialized into an array, otherwise you get the raw string
string$nameFor error messages this indicates the section of the problem.
Returns
string|NULL Data string or NULL in case of an error private
See also
loadFile()

Definition at line 2040 of file Import.php.

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

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

◆ import_addFileNameToBeCopied()

TYPO3\CMS\Impexp\Import::import_addFileNameToBeCopied (   $fI)

Writes the file from import array to temp dir and returns the filename of it.

Parameters
array$fIFile information with three keys: "filename" = filename without path, "ID_absFile" = absolute filepath to the file (including the filename), "ID" = md5 hash of "ID_absFile
Returns
string|NULL Absolute filename of the temporary filename of the file. In ->alternativeFileName the original name is set.

Definition at line 1251 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Core\Utility\GeneralUtility\tempnam(), and TYPO3\CMS\Core\Utility\GeneralUtility\writeFile().

Referenced by TYPO3\CMS\Impexp\Import\remapListedDBRecords_flexFormCallBack(), and TYPO3\CMS\Impexp\Import\setRelations().

◆ importData()

◆ init()

TYPO3\CMS\Impexp\Import::init ( )

Init the object

Returns
void

Definition at line 169 of file Import.php.

◆ initializeImport()

TYPO3\CMS\Impexp\Import::initializeImport ( )
protected

Initialize all settings for the import

Returns
void

Definition at line 184 of file Import.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

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

◆ isEquivalentObjectStorage()

TYPO3\CMS\Impexp\Import::isEquivalentObjectStorage ( ResourceStorage  $storageObject,
array  $storageRecord 
)
protected

Determines whether the passed storage object and record (sys_file_storage) can be seen as equivalent during import.

Parameters
ResourceStorage$storageObjectThe storage object which should get compared
array$storageRecordThe storage record which should get compared
Returns
bool Returns TRUE when both object storages can be seen as equivalent

Definition at line 314 of file Import.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getConfiguration(), TYPO3\CMS\Core\Resource\ResourceStorage\getDriverType(), TYPO3\CMS\Core\Resource\ResourceFactory\getInstance(), TYPO3\CMS\Core\Resource\ResourceStorage\isOnline(), and TYPO3\CMS\Core\Resource\ResourceStorage\isWritable().

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

◆ isFallbackStorage()

TYPO3\CMS\Impexp\Import::isFallbackStorage (   $storageId)
protected

Checks if the $storageId is the id of the fallback storage

Parameters
int | string$storageId
Returns
bool

Definition at line 555 of file Import.php.

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

◆ loadContent()

TYPO3\CMS\Impexp\Import::loadContent (   $filecontent)

Loads T3D file content into the $this->dat array (This function can be used to test the output strings from ->compileMemoryToFileContent())

Parameters
string$filecontentFile content
Returns
void

Definition at line 2083 of file Import.php.

References TYPO3\CMS\Impexp\Import\getNextContentPart(), and TYPO3\CMS\Impexp\Import\loadInit().

◆ loadFile()

TYPO3\CMS\Impexp\Import::loadFile (   $filename,
  $all = false 
)

Loads the header section/all of the $filename into memory

Parameters
string$filenameFilename, absolute
bool$allIf set, all information is loaded (header, records and files). Otherwise the default is to read only the header information
Returns
bool TRUE if the operation went well

Definition at line 1976 of file Import.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\copyDirectory(), TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Impexp\Import\getNextFilePart(), TYPO3\CMS\Impexp\ImportExport\getTemporaryFolderName(), TYPO3\CMS\Core\Utility\GeneralUtility\getUrl(), TYPO3\CMS\Core\Utility\GeneralUtility\isAllowedAbsPath(), TYPO3\CMS\Impexp\Import\loadInit(), and TYPO3\CMS\Core\Utility\GeneralUtility\xml2array().

◆ loadInit()

TYPO3\CMS\Impexp\Import::loadInit ( )

Setting up the object based on the recently loaded ->dat array

Returns
void

Definition at line 2134 of file Import.php.

References TYPO3\CMS\Core\Utility\VersionNumberUtility\convertVersionNumberToInteger(), and TYPO3\CMS\Impexp\Import\fixCharsets().

Referenced by TYPO3\CMS\Impexp\Import\loadContent(), and TYPO3\CMS\Impexp\Import\loadFile().

◆ migrateLegacyImportRecords()

TYPO3\CMS\Impexp\Import::migrateLegacyImportRecords ( )
protected

Migrate legacy import records

Returns
void

Definition at line 1864 of file Import.php.

References $uid, TYPO3\CMS\Impexp\Import\getNewTCE(), and TYPO3\CMS\Backend\Utility\BackendUtility\getRecord().

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

◆ processSoftReferences_flexFormCallBack()

TYPO3\CMS\Impexp\Import::processSoftReferences_flexFormCallBack (   $pParams,
  $dsConf,
  $dataValue,
  $dataValue_ext1,
  $dataValue_ext2,
  $path 
)

Callback function for traversing the FlexForm structure in relation to remapping softreference relations

Parameters
array$pParamsSet of parameters in numeric array: table, uid, field
array$dsConfTCA config for field (from Data Structure of course)
string$dataValueField value (from FlexForm XML)
string$dataValue_ext1Not used
string$dataValue_ext2Not used
string$pathPath of where the data structure where the element is found
Returns
array Array where the "value" key carries the value.
See also
setFlexFormRelations()

Definition at line 1487 of file Import.php.

References TYPO3\CMS\Impexp\Import\processSoftReferences_substTokens().

◆ processSoftReferences_saveFile()

TYPO3\CMS\Impexp\Import::processSoftReferences_saveFile (   $relFileName,
  $cfg,
  $table,
  $uid 
)

◆ processSoftReferences_saveFile_createRelFile()

TYPO3\CMS\Impexp\Import::processSoftReferences_saveFile_createRelFile (   $origDirPrefix,
  $fileName,
  $fileID,
  $table,
  $uid 
)

◆ processSoftReferences_substTokens()

TYPO3\CMS\Impexp\Import::processSoftReferences_substTokens (   $tokenizedContent,
  $softRefCfgs,
  $table,
  $uid 
)

Substition of softreference tokens

Parameters
string$tokenizedContentContent of field with soft reference tokens in.
array$softRefCfgsSoft reference configurations
string$tableTable for which the processing occurs
string$uidUID of record from table
Returns
string The input content with tokens substituted according to entries in softRefCfgs

Definition at line 1521 of file Import.php.

References $uid, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Impexp\Import\processSoftReferences_saveFile(), and TYPO3\CMS\Backend\Utility\BackendUtility\wsMapId().

Referenced by TYPO3\CMS\Impexp\Import\processSoftReferences_flexFormCallBack(), and TYPO3\CMS\Impexp\Import\remapListedDBRecords_flexFormCallBack().

◆ remapListedDBRecords_flexFormCallBack()

TYPO3\CMS\Impexp\Import::remapListedDBRecords_flexFormCallBack (   $pParams,
  $dsConf,
  $dataValue,
  $dataValue_ext1,
  $dataValue_ext2,
  $path 
)

Callback function for traversing the FlexForm structure in relation to remapping database relations

Parameters
array$pParamsSet of parameters in numeric array: table, uid, field
array$dsConfTCA config for field (from Data Structure of course)
string$dataValueField value (from FlexForm XML)
string$dataValue_ext1Not used
string$dataValue_ext2Not used
string$pathPath of where the data structure of the element is found
Returns
array Array where the "value" key carries the value.
See also
setFlexFormRelations()

Definition at line 1374 of file Import.php.

References $GLOBALS, $uid, TYPO3\CMS\Impexp\ImportExport\callHook(), TYPO3\CMS\Backend\Utility\BackendUtility\getFlexFormDS(), TYPO3\CMS\Impexp\Import\getNewTCE(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Impexp\Import\import_addFileNameToBeCopied(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), TYPO3\CMS\Impexp\Import\processSoftReferences_substTokens(), TYPO3\CMS\Impexp\Import\setRelations_db(), TYPO3\CMS\Backend\Utility\BackendUtility\wsMapId(), and TYPO3\CMS\Core\Utility\GeneralUtility\xml2array().

◆ removeSysFileReferenceRecordsFromImportDataWithRelationToMissingFile()

TYPO3\CMS\Impexp\Import::removeSysFileReferenceRecordsFromImportDataWithRelationToMissingFile ( )
protected

Removes all sys_file_reference records from the import data array that are pointing to sys_file records which are missing not in the import data to prevent exceptions on checking the related file started by the Datahandler.

Returns
void

Definition at line 530 of file Import.php.

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

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

◆ setFlexFormRelations()

TYPO3\CMS\Impexp\Import::setFlexFormRelations ( )

After all DB relations has been set in the end of the import (see setRelations()) then it is time to correct all relations inside of FlexForm fields. The reason for doing this after is that the setting of relations may affect (quite often!) which data structure is used for the flexforms field!

Returns
void
See also
setRelations()

Definition at line 1292 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\$dat, $GLOBALS, $uid, TYPO3\CMS\Impexp\ImportExport\callHook(), TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Backend\Utility\BackendUtility\getFlexFormDS(), TYPO3\CMS\Impexp\Import\getNewTCE(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), TYPO3\CMS\Backend\Utility\BackendUtility\wsMapId(), and TYPO3\CMS\Core\Utility\GeneralUtility\xml2array().

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

◆ setRelations()

TYPO3\CMS\Impexp\Import::setRelations ( )

At the end of the import process all file and DB relations should be set properly (that is relations to imported records are all re-created so imported records are correctly related again) Relations in flexform fields are processed in setFlexFormRelations() after this function

Returns
void
See also
setFlexFormRelations()

Definition at line 1075 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\$dat, $GLOBALS, $uid, TYPO3\CMS\Impexp\ImportExport\callHook(), TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Impexp\Import\getNewTCE(), TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), TYPO3\CMS\Impexp\Import\import_addFileNameToBeCopied(), TYPO3\CMS\Core\Resource\DuplicationBehavior\RENAME, TYPO3\CMS\Impexp\Import\setRelations_db(), and TYPO3\CMS\Backend\Utility\BackendUtility\wsMapId().

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

◆ setRelations_db()

TYPO3\CMS\Impexp\Import::setRelations_db (   $itemArray,
  $itemConfig 
)

Maps relations for database

Parameters
array$itemArrayArray of item sets (table/uid) from a dbAnalysis object
array$itemConfigArray of TCA config of the field the relation to be set on
Returns
array Array with values [table]_[uid] or [uid] for field of type group / internal_type file_reference. These values have the regular tcemain-input group/select type which means they will automatically be processed into a uid-list or MM relations.

Definition at line 1207 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Core\Resource\ResourceFactory\getInstance(), TYPO3\CMS\Impexp\ImportExport\isExcluded(), and TYPO3\CMS\Impexp\ImportExport\isTableStatic().

Referenced by TYPO3\CMS\Impexp\Import\remapListedDBRecords_flexFormCallBack(), and TYPO3\CMS\Impexp\Import\setRelations().

◆ unlinkTempFiles()

TYPO3\CMS\Impexp\Import::unlinkTempFiles ( )

Cleaning up all the temporary files stored in typo3temp/ folder

Returns
void

Definition at line 1047 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Core\Utility\GeneralUtility\isFirstPartOfStr(), and TYPO3\CMS\Core\Utility\GeneralUtility\unlink_tempfile().

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

◆ writeFileVerify()

TYPO3\CMS\Impexp\Import::writeFileVerify (   $fileName,
  $fileID,
  $bypassMountCheck = false 
)

Writes a file from the import memory having $fileID to file name $fileName which must be an absolute path inside PATH_site

Parameters
string$fileNameAbsolute filename inside PATH_site to write to
string$fileIDFile ID from import memory
bool$bypassMountCheckBypasses the checking against filemounts - only for RTE files!
Returns
bool Returns TRUE if it went well. Notice that the content of the file is read again, and md5 from import memory is validated.

Definition at line 1753 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\$fileProcObj, TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Impexp\ImportExport\getBackendUser(), TYPO3\CMS\Core\Utility\GeneralUtility\getFileAbsFileName(), TYPO3\CMS\Impexp\ImportExport\getFileProcObj(), TYPO3\CMS\Core\Utility\GeneralUtility\getUrl(), TYPO3\CMS\Core\Utility\GeneralUtility\split_fileref(), and TYPO3\CMS\Core\Utility\GeneralUtility\writeFile().

Referenced by TYPO3\CMS\Impexp\Import\processSoftReferences_saveFile(), and TYPO3\CMS\Impexp\Import\processSoftReferences_saveFile_createRelFile().

◆ writeRecords_pages()

TYPO3\CMS\Impexp\Import::writeRecords_pages (   $pid)

Writing pagetree/pages to database:

Parameters
int$pidPID in which to import. If the operation is an update operation, the root of the page tree inside will be moved to this PID unless it is the same as the root page from the import
Returns
void
See also
writeRecords_records()

Definition at line 676 of file Import.php.

References TYPO3\CMS\Impexp\Import\$suggestedInsertUids, $uid, TYPO3\CMS\Impexp\ImportExport\addGeneralErrorsByTable(), TYPO3\CMS\Impexp\Import\addSingle(), TYPO3\CMS\Impexp\Import\addToMapId(), TYPO3\CMS\Impexp\ImportExport\callHook(), TYPO3\CMS\Impexp\ImportExport\flatInversePageTree(), TYPO3\CMS\Impexp\Import\getNewTCE(), and TYPO3\CMS\Impexp\Import\writeRecords_pages_order().

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

◆ writeRecords_pages_order()

TYPO3\CMS\Impexp\Import::writeRecords_pages_order ( )

Organize all updated pages in page tree so they are related like in the import file Only used for updates and when $this->dat['header']['pagetree'] is an array.

Returns
void private
See also
writeRecords_pages(), writeRecords_records_order()

Definition at line 732 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\callHook(), TYPO3\CMS\Impexp\ImportExport\dontIgnorePid(), TYPO3\CMS\Impexp\Import\flatInversePageTree_pid(), and TYPO3\CMS\Impexp\Import\getNewTCE().

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

◆ writeRecords_records()

◆ writeRecords_records_order()

TYPO3\CMS\Impexp\Import::writeRecords_records_order (   $mainPid)

Organize all updated record to their new positions. Only used for updates

Parameters
int$mainPidMain PID into which we import.
Returns
void private
See also
writeRecords_records(), writeRecords_pages_order()

Definition at line 857 of file Import.php.

References $uid, TYPO3\CMS\Impexp\ImportExport\callHook(), TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Impexp\ImportExport\dontIgnorePid(), TYPO3\CMS\Impexp\ImportExport\flatInversePageTree(), and TYPO3\CMS\Impexp\Import\getNewTCE().

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

◆ writeSysFileResourceForLegacyImport()

TYPO3\CMS\Impexp\Import::writeSysFileResourceForLegacyImport ( $fileName,
  $fileId 
)
protected

Writes the file with the is $fileId to the legacy import folder. The file name will used from argument $fileName and the file was successfully created or an identical file was already found, $fileName will held the uid of the new created file record.

Parameters
string$fileNameThe file name for the new file. Value would be changed to the uid of the new created file record.
int$fileIdThe id of the file in data array
Returns
bool

Definition at line 1797 of file Import.php.

References TYPO3\CMS\Impexp\Import\$legacyImportFolder, TYPO3\CMS\Core\Utility\PathUtility\dirname(), TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Core\Resource\DuplicationBehavior\RENAME, and TYPO3\CMS\Impexp\Import\writeTemporaryFileFromData().

Referenced by TYPO3\CMS\Impexp\Import\processSoftReferences_saveFile(), and TYPO3\CMS\Impexp\Import\processSoftReferences_saveFile_createRelFile().

◆ writeSysFileStorageRecords()

TYPO3\CMS\Impexp\Import::writeSysFileStorageRecords ( )
protected

◆ writeTemporaryFileFromData()

TYPO3\CMS\Impexp\Import::writeTemporaryFileFromData (   $fileId,
  $dataKey = 'files_fal' 
)
protected

Writes the file from import array to temp dir and returns the filename of it.

Parameters
string$fileId
string$dataKey
Returns
string Absolute filename of the temporary filename of the file

Definition at line 646 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Core\Utility\GeneralUtility\tempnam(), and TYPO3\CMS\Core\Utility\GeneralUtility\writeFile().

Referenced by TYPO3\CMS\Impexp\Import\checkImportPrerequisites(), and TYPO3\CMS\Impexp\Import\writeSysFileResourceForLegacyImport().

Member Data Documentation

◆ $alternativeFileName

TYPO3\CMS\Impexp\Import::$alternativeFileName = []
protected

Definition at line 148 of file Import.php.

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

◆ $alternativeFilePath

TYPO3\CMS\Impexp\Import::$alternativeFilePath = []
protected

Definition at line 153 of file Import.php.

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

◆ $enableLogging

TYPO3\CMS\Impexp\Import::$enableLogging = false

Definition at line 51 of file Import.php.

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

◆ $filePathMap

TYPO3\CMS\Impexp\Import::$filePathMap = []
protected

Definition at line 158 of file Import.php.

◆ $filesPathForImport

TYPO3\CMS\Impexp\Import::$filesPathForImport = null
protected

Definition at line 138 of file Import.php.

◆ $import_data

TYPO3\CMS\Impexp\Import::$import_data = []

Definition at line 74 of file Import.php.

◆ $import_newId

TYPO3\CMS\Impexp\Import::$import_newId = []

Definition at line 60 of file Import.php.

◆ $import_newId_pids

TYPO3\CMS\Impexp\Import::$import_newId_pids = []

Definition at line 67 of file Import.php.

◆ $legacyImport

TYPO3\CMS\Impexp\Import::$legacyImport = false
protected

Definition at line 88 of file Import.php.

◆ $legacyImportFolder

TYPO3\CMS\Impexp\Import::$legacyImportFolder = null
protected

◆ $legacyImportMigrationRecords

TYPO3\CMS\Impexp\Import::$legacyImportMigrationRecords = []
protected

Definition at line 133 of file Import.php.

◆ $legacyImportMigrationTables

TYPO3\CMS\Impexp\Import::$legacyImportMigrationTables
protected
Initial value:
= [
'tt_content' => [
'image' => [
'titleTexts' => 'titleText'

Definition at line 107 of file Import.php.

◆ $legacyImportTargetPath

TYPO3\CMS\Impexp\Import::$legacyImportTargetPath = '_imported/'
protected

Definition at line 100 of file Import.php.

◆ $storageObjects

TYPO3\CMS\Impexp\Import::$storageObjects = []
protected

Definition at line 81 of file Import.php.

◆ $suggestedInsertUids

TYPO3\CMS\Impexp\Import::$suggestedInsertUids = []

◆ $unlinkFiles

TYPO3\CMS\Impexp\Import::$unlinkFiles = []
protected

Definition at line 143 of file Import.php.