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

Public Member Functions

 __construct ()
 
 loadFile (string $fileName, bool $all=false)
 
array getSupportedFileExtensions ()
 
 getMetaData ()
 
 checkImportPrerequisites ()
 
 importData ()
 
array writeFilesToTemporaryFolder (array $files)
 
array remapRelationsOfFlexFormCallBack (array $pParams, array $dsConf, string $dataValue, $dataValue_ext1, string $path)
 
array processSoftReferencesFlexFormCallBack (array $pParams, array $dsConf, string $dataValue, $dataValue_ext1, string $path)
 
bool isEnableLogging ()
 
 setEnableLogging (bool $enableLogging)
 
bool isDecompressionAvailable ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Impexp\ImportExport
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 ()
 

Public Attributes

const IMPORT_MODE_FORCE_UID = 'force_uid'
 
const IMPORT_MODE_AS_NEW = 'as_new'
 
const IMPORT_MODE_EXCLUDE = 'exclude'
 
const IMPORT_MODE_IGNORE_PID = 'ignore_pid'
 
const IMPORT_MODE_RESPECT_PID = 'respect_pid'
 
const SOFTREF_IMPORT_MODE_EXCLUDE = 'exclude'
 
const SOFTREF_IMPORT_MODE_EDITABLE = 'editable'
 

Protected Member Functions

array string null getNextFilePart ($fd, bool $unserialize=false, string $name='')
 
 loadInit ()
 
 initializeImport ()
 
 writeSysFileStorageRecords ()
 
bool isEquivalentStorage (ResourceStorage &$storageObject, array &$storageRecord)
 
 writeSysFileRecords ()
 
 fixUidLocalInSysFileReferenceRecords (int $oldFileUid, int $newFileUid)
 
 removeSysFileReferenceRecordsWithRelationToMissingFile ()
 
 writePages ()
 
 writePagesOrder ()
 
bool doRespectPid (string $table, int $uid)
 
 writeRecords ()
 
 writeRecordsOrder ()
 
 addSingle (array &$importData, string $table, int $uid, $pid)
 
int float string getReferenceDefaultValue (array $configuration)
 
array null getSysFileMetaDataFromDatabase (int $pid, int $file, int $sysLanguageUid)
 
 addToMapId (array $importData, array $substNEWwithIDs)
 
DataHandler createDataHandler ()
 
 setRelations ()
 
array remapRelationsOfField (array &$fieldRelations, array $fieldConfig)
 
 setFlexFormRelations ()
 
 processSoftReferences ()
 
string processSoftReferencesSubstTokens (string $tokenizedContent, array $softrefs, string $table, string $uid)
 
string processSoftReferencesSaveFile (string $relFileName, array $softref, string $table, string $uid)
 
string null processSoftReferencesSaveFileCreateRelFile (string $origDirPrefix, string $fileName, string $fileID, string $table, string $uid)
 
bool writeFileVerify (string $fileName, string $fileID, bool $bypassMountCheck=false)
 
bool checkOrCreateDir (string $dirPrefix)
 
 callHook (string $name, array $params)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Impexp\ImportExport
 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 = 'import'
 
array $suggestedInsertUids = array( )
 
bool $enableLogging = false
 
array $importNewId = array( )
 
array $importNewIdPids = array( )
 
bool $decompressionAvailable = false
 
bool $isFilesSavedOutsideImportFile = false
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Impexp\ImportExport
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
 

Private Attributes

array $supportedFileExtensions = array( )
 

Detailed Description

T3D file Import library (TYPO3 Record Document)

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

Definition at line 49 of file Import.php.

Constructor & Destructor Documentation

◆ __construct()

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

The constructor

Reimplemented from TYPO3\CMS\Impexp\ImportExport.

Definition at line 106 of file Import.php.

Member Function Documentation

◆ addSingle()

TYPO3\CMS\Impexp\Import::addSingle ( array &  $importData,
string  $table,
int  $uid,
  $pid 
)
protected

Adds a single record to the $importData array. Also copies files to the temporary folder. However all file and database references and flexform fields are set to blank for now! That is processed with setRelations() later.

Parameters
array$importData‪Data to be modified or inserted in the database during import
string$table‪Table name
int$uid‪Record UID
int | string$pid‪Page id or NEW-id, e.g. "NEW5fb3c2641281c885267727"
See also
setRelations()

Definition at line 952 of file Import.php.

References $GLOBALS, TYPO3\CMS\Impexp\ImportExport\$pid, TYPO3\CMS\Impexp\ImportExport\addError(), TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Impexp\ImportExport\getBackendUser(), TYPO3\CMS\Impexp\ImportExport\getRecordFromDatabase(), TYPO3\CMS\Impexp\Import\getReferenceDefaultValue(), TYPO3\CMS\Impexp\Import\getSysFileMetaDataFromDatabase(), and TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

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

◆ addToMapId()

TYPO3\CMS\Impexp\Import::addToMapId ( array  $importData,
array  $substNEWwithIDs 
)
protected

Store the mapping between the import file record UIDs and the final record UIDs in the database after import.

Parameters
array$importData‪Data to be modified or inserted in the database during import
array$substNEWwithIDs‪A map between the "NEW..." string IDs and the eventual record UID in database
See also
writeRecords()

Definition at line 1128 of file Import.php.

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

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

◆ callHook()

TYPO3\CMS\Impexp\Import::callHook ( string  $name,
array  $params 
)
protected

◆ checkImportPrerequisites()

◆ checkOrCreateDir()

bool TYPO3\CMS\Impexp\Import::checkOrCreateDir ( string  $dirPrefix)
protected

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

Parameters
string$dirPrefix‪Directory to create. Having a trailing slash. Must be in fileadmin/. Relative to public web path
Returns
‪bool TRUE, if directory exists (was created)

Definition at line 1786 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\addError(), TYPO3\CMS\Impexp\ImportExport\getFileadminFolderName(), TYPO3\CMS\Core\Core\Environment\getPublicPath(), and TYPO3\CMS\Core\Utility\GeneralUtility\mkdir().

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

◆ createDataHandler()

◆ doRespectPid()

bool TYPO3\CMS\Impexp\Import::doRespectPid ( string  $table,
int  $uid 
)
protected

Checks if the position of an updated record is configured to be corrected. This can be disabled globally and changed individually for elements.

Parameters
string$table‪Table name
int$uid‪Record UID
Returns
‪bool TRUE if the position of the record should be updated to match the one in the import structure

Definition at line 819 of file Import.php.

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

◆ fixUidLocalInSysFileReferenceRecords()

TYPO3\CMS\Impexp\Import::fixUidLocalInSysFileReferenceRecords ( int  $oldFileUid,
int  $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

Definition at line 669 of file Import.php.

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

◆ getMetaData()

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

Definition at line 292 of file Import.php.

◆ getNextFilePart()

array string null TYPO3\CMS\Impexp\Import::getNextFilePart (   $fd,
bool  $unserialize = false,
string  $name = '' 
)
protected

Extracts the next content part of the T3D file

Parameters
resource$fdImport file pointer
bool$unserialize‪If set, the returned content is deserialized into an array, otherwise you get the raw string
string$name‪For error messages this indicates the section of the problem.
Returns
‪array|string|null Data array if unserializing or data string if not unserializing or NULL in case of an error
See also
loadFile()

Definition at line 242 of file Import.php.

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

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

◆ getReferenceDefaultValue()

int float string TYPO3\CMS\Impexp\Import::getReferenceDefaultValue ( array  $configuration)
protected

Get the default value for a reference field.

Parameters
array$configuration‪The TCA configuration of the accordant field
Returns
‪int|float|string

Definition at line 1075 of file Import.php.

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

◆ getSupportedFileExtensions()

array TYPO3\CMS\Impexp\Import::getSupportedFileExtensions ( )
Returns
‪array

Definition at line 219 of file Import.php.

References TYPO3\CMS\Impexp\Import\$supportedFileExtensions.

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

◆ getSysFileMetaDataFromDatabase()

array null TYPO3\CMS\Impexp\Import::getSysFileMetaDataFromDatabase ( int  $pid,
int  $file,
int  $sysLanguageUid 
)
protected

Selects sys_file_metadata database record.

Parameters
int$pid
int$file
int$sysLanguageUid
Returns
‪array|null

Definition at line 1094 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\$pid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

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

◆ importData()

◆ initializeImport()

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

Initialize all settings for the import

Definition at line 414 of file Import.php.

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

◆ isDecompressionAvailable()

bool TYPO3\CMS\Impexp\Import::isDecompressionAvailable ( )
Returns
‪bool

Definition at line 1848 of file Import.php.

References TYPO3\CMS\Impexp\Import\$decompressionAvailable.

◆ isEnableLogging()

bool TYPO3\CMS\Impexp\Import::isEnableLogging ( )
Returns
‪bool

Definition at line 1832 of file Import.php.

References TYPO3\CMS\Impexp\Import\$enableLogging.

◆ isEquivalentStorage()

bool TYPO3\CMS\Impexp\Import::isEquivalentStorage ( ResourceStorage $storageObject,
array &  $storageRecord 
)
protected

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

Parameters
ResourceStorage$storageObject‪The storage object which should get compared
array$storageRecord‪The storage record which should get compared
Returns
‪bool Returns TRUE if both storage representations can be considered equal

Definition at line 493 of file Import.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getConfiguration(), TYPO3\CMS\Core\Resource\ResourceStorage\getDriverType(), 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().

◆ loadFile()

TYPO3\CMS\Impexp\Import::loadFile ( string  $fileName,
bool  $all = false 
)

◆ loadInit()

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

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

Definition at line 285 of file Import.php.

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

◆ processSoftReferences()

◆ processSoftReferencesFlexFormCallBack()

array TYPO3\CMS\Impexp\Import::processSoftReferencesFlexFormCallBack ( array  $pParams,
array  $dsConf,
string  $dataValue,
  $dataValue_ext1,
string  $path 
)

Callback function to traverse the FlexForm structure and remap its soft reference relations.

Parameters
array$pParams‪Set of parameters in numeric array: table, uid, field, soft references
array$dsConf‪TCA config for field (from Data Structure of course)
string$dataValue‪Field value (from FlexForm XML)
string$dataValue_ext1‪Not used
string$path‪Path 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 1542 of file Import.php.

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

◆ processSoftReferencesSaveFile()

string TYPO3\CMS\Impexp\Import::processSoftReferencesSaveFile ( string  $relFileName,
array  $softref,
string  $table,
string  $uid 
)
protected

Process a soft reference file

Parameters
string$relFileName‪Old Relative filename
array$softref‪Soft reference
string$table‪Table for which the processing occurs
string$uid‪UID of record from table
Returns
‪string New relative filename (value to insert instead of the softref token)

Definition at line 1624 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\addError(), TYPO3\CMS\Core\Utility\PathUtility\basename(), TYPO3\CMS\Core\Utility\PathUtility\dirname(), TYPO3\CMS\Impexp\ImportExport\getFileadminFolderName(), and TYPO3\CMS\Impexp\Import\processSoftReferencesSaveFileCreateRelFile().

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

◆ processSoftReferencesSaveFileCreateRelFile()

string null TYPO3\CMS\Impexp\Import::processSoftReferencesSaveFileCreateRelFile ( string  $origDirPrefix,
string  $fileName,
string  $fileID,
string  $table,
string  $uid 
)
protected

◆ processSoftReferencesSubstTokens()

string TYPO3\CMS\Impexp\Import::processSoftReferencesSubstTokens ( string  $tokenizedContent,
array  $softrefs,
string  $table,
string  $uid 
)
protected

Substitution of soft reference tokens

Parameters
string$tokenizedContent‪Content of field with soft reference tokens in.
array$softrefs‪Soft references
string$table‪Table of record for which the processing occurs
string$uid‪UID of record from table
Returns
‪string The input content with tokens substituted according to entries in $softrefs

Definition at line 1573 of file Import.php.

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

Referenced by TYPO3\CMS\Impexp\Import\processSoftReferences(), and TYPO3\CMS\Impexp\Import\processSoftReferencesFlexFormCallBack().

◆ remapRelationsOfField()

array TYPO3\CMS\Impexp\Import::remapRelationsOfField ( array &  $fieldRelations,
array  $fieldConfig 
)
protected

Maps the original record UIDs of the relations to the actual UIDs of the imported records and returns relations as strings of type [table]_[uid] - or file:[uid] or [public url] for field of type "group" and internal_type "file_reference". These strings have the regular DataHandler input group/select type format which means they will automatically be processed into a list of UIDs or MM relations.

Parameters
array$fieldRelations‪Relations with original record UIDs
array$fieldConfig‪TCA configuration of the record field the relations belong to
Returns
‪array Array of relation strings with actual record UIDs

Definition at line 1247 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\addError(), TYPO3\CMS\Impexp\ImportExport\isRecordExcluded(), and TYPO3\CMS\Impexp\ImportExport\isTableStatic().

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

◆ remapRelationsOfFlexFormCallBack()

array TYPO3\CMS\Impexp\Import::remapRelationsOfFlexFormCallBack ( array  $pParams,
array  $dsConf,
string  $dataValue,
  $dataValue_ext1,
string  $path 
)

Callback function to remap relations in FlexForm data

Parameters
array$pParams‪Set of parameters passed through by calling method setFlexFormRelations()
array$dsConf‪TCA config for field (from Data Structure of course)
string$dataValue‪Field value (from FlexForm XML)
string$dataValue_ext1‪Not used
string$path‪Path of where the data structure of the element is found
Returns
‪array Array where the "value" key carries the mapped relation string.
See also
setFlexFormRelations()

Definition at line 1422 of file Import.php.

References TYPO3\CMS\Impexp\Import\remapRelationsOfField(), and TYPO3\CMS\Impexp\Import\writeFilesToTemporaryFolder().

◆ removeSysFileReferenceRecordsWithRelationToMissingFile()

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

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

Definition at line 689 of file Import.php.

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

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

◆ setEnableLogging()

TYPO3\CMS\Impexp\Import::setEnableLogging ( bool  $enableLogging)
Parameters
bool$enableLogging

Definition at line 1840 of file Import.php.

References TYPO3\CMS\Impexp\Import\$enableLogging.

◆ setFlexFormRelations()

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

After all database relations have 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 FlexForm field!

See also
setRelations()

Definition at line 1327 of file Import.php.

References $GLOBALS, TYPO3\CMS\Impexp\ImportExport\addError(), TYPO3\CMS\Core\Serializer\Typo3XmlSerializerOptions\ALLOW_UNDEFINED_NAMESPACES, TYPO3\CMS\Impexp\Import\callHook(), and TYPO3\CMS\Impexp\Import\createDataHandler().

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

◆ setRelations()

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

At the end of the import process all file and database relations should be set properly. This means that the relations to imported records are all recreated so that the imported records are correctly related again. Relations in flexform fields are processed in setFlexFormRelations() after this function.

See also
setFlexFormRelations()

Definition at line 1181 of file Import.php.

References $GLOBALS, TYPO3\CMS\Impexp\ImportExport\addError(), TYPO3\CMS\Impexp\Import\callHook(), TYPO3\CMS\Impexp\Import\createDataHandler(), TYPO3\CMS\Impexp\Import\remapRelationsOfField(), and TYPO3\CMS\Impexp\Import\writeFilesToTemporaryFolder().

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

◆ writeFilesToTemporaryFolder()

array TYPO3\CMS\Impexp\Import::writeFilesToTemporaryFolder ( array  $files)

Writes the files from the import array to the temporary folder and returns the actual filenames.

Parameters
array$files‪Files of file 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
‪array Absolute file paths of the temporary files.

Definition at line 1288 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\addError(), TYPO3\CMS\Impexp\ImportExport\getOrCreateTemporaryFolderName(), and TYPO3\CMS\Core\Utility\GeneralUtility\writeFile().

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

◆ writeFileVerify()

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

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

Parameters
string$fileName‪Absolute filename inside public web path to write to
string$fileID‪File ID from import memory
bool$bypassMountCheck‪Bypasses the checking against file mounts - 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 1742 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\$fileProcObj, TYPO3\CMS\Impexp\ImportExport\addError(), TYPO3\CMS\Core\Utility\PathUtility\dirname(), TYPO3\CMS\Impexp\ImportExport\getFileProcObj(), and TYPO3\CMS\Core\Utility\GeneralUtility\writeFile().

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

◆ writePages()

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

Writing page tree / pages to database: 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.

See also
writeRecords()

Definition at line 717 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\$pid, TYPO3\CMS\Impexp\Import\$suggestedInsertUids, TYPO3\CMS\Impexp\Import\addSingle(), TYPO3\CMS\Impexp\Import\addToMapId(), TYPO3\CMS\Impexp\Import\callHook(), TYPO3\CMS\Impexp\Import\createDataHandler(), TYPO3\CMS\Impexp\ImportExport\flatInversePageTree(), and TYPO3\CMS\Impexp\Import\writePagesOrder().

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

◆ writePagesOrder()

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

◆ writeRecords()

◆ writeRecordsOrder()

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

◆ writeSysFileRecords()

◆ writeSysFileStorageRecords()

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

Member Data Documentation

◆ $decompressionAvailable

bool TYPO3\CMS\Impexp\Import::$decompressionAvailable = false
protected

Definition at line 93 of file Import.php.

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

◆ $enableLogging

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

◆ $importNewId

array TYPO3\CMS\Impexp\Import::$importNewId = array( )
protected

Keys are [tablename]:[new NEWxxx ids (or when updating it is uids)] while values are arrays with table/uid of the original record it is based on. With the array keys the new ids can be looked up inside DataHandler

Definition at line 83 of file Import.php.

◆ $importNewIdPids

array TYPO3\CMS\Impexp\Import::$importNewIdPids = array( )
protected

Page id map for page tree (import)

Definition at line 89 of file Import.php.

◆ $isFilesSavedOutsideImportFile

bool TYPO3\CMS\Impexp\Import::$isFilesSavedOutsideImportFile = false
protected

Definition at line 101 of file Import.php.

◆ $mode

string TYPO3\CMS\Impexp\Import::$mode = 'import'
protected

Definition at line 62 of file Import.php.

◆ $suggestedInsertUids

array TYPO3\CMS\Impexp\Import::$suggestedInsertUids = array( )
protected

Used to register the forced UID values for imported records that we want to create with the same UIDs as in the import file. Admin-only feature.

Definition at line 69 of file Import.php.

Referenced by TYPO3\CMS\Impexp\Import\writePages(), and TYPO3\CMS\Impexp\Import\writeRecords().

◆ $supportedFileExtensions

array TYPO3\CMS\Impexp\Import::$supportedFileExtensions = array( )
private

Definition at line 97 of file Import.php.

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

◆ IMPORT_MODE_AS_NEW

◆ IMPORT_MODE_EXCLUDE

◆ IMPORT_MODE_FORCE_UID

◆ IMPORT_MODE_IGNORE_PID

const TYPO3\CMS\Impexp\Import::IMPORT_MODE_IGNORE_PID = 'ignore_pid'

◆ IMPORT_MODE_RESPECT_PID

const TYPO3\CMS\Impexp\Import::IMPORT_MODE_RESPECT_PID = 'respect_pid'

◆ SOFTREF_IMPORT_MODE_EDITABLE

◆ SOFTREF_IMPORT_MODE_EXCLUDE