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

Public Member Functions

 init ()
 
 importData ($pid)
 
array checkImportPrerequisites ()
 
 writeRecords_pages ($pid)
 
 writeRecords_pages_order ()
 
array flatInversePageTree_pid ($idH, $a=[], $pid=-1)
 
 writeRecords_records ($pid)
 
 writeRecords_records_order ($mainPid)
 
 addSingle ($table, $uid, $pid)
 
 addToMapId ($substNEWwithIDs)
 
DataHandler getNewTCE ()
 
 unlinkTempFiles ()
 
 setRelations ()
 
array setRelations_db ($itemArray, $itemConfig)
 
string null import_addFileNameToBeCopied ($fI)
 
 setFlexFormRelations ()
 
array remapListedDBRecords_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2, $path)
 
 processSoftReferences ()
 
array processSoftReferences_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2, $path)
 
string processSoftReferences_substTokens ($tokenizedContent, $softRefCfgs, $table, $uid)
 
string processSoftReferences_saveFile ($relFileName, $cfg, $table, $uid)
 
string null processSoftReferences_saveFile_createRelFile ($origDirPrefix, $fileName, $fileID, $table, $uid)
 
bool writeFileVerify ($fileName, $fileID, $bypassMountCheck=false)
 
bool checkOrCreateDir ($dirPrefix)
 
bool loadFile ($filename, $all=false)
 
string null getNextFilePart ($fd, $unserialize=false, $name='')
 
 loadContent ($filecontent)
 
string null getNextContentPart ($filecontent, &$pointer, $unserialize=false, $name='')
 
 loadInit ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Impexp\ImportExport
 __construct ()
 
array 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='')
 
bool checkDokType ($checkTable, $doktype)
 
string renderControls ($r)
 
string softrefSelector ($cfg)
 
string bool verifyFolderAccess ($dirPrefix, $noAlternative=false)
 
array flatInversePageTree ($idH, $a=[])
 
bool isTableStatic ($table)
 
bool inclRelation ($table)
 
bool isExcluded ($table, $uid)
 
bool includeSoftref ($tokenID)
 
bool checkPID ($pid)
 
bool dontIgnorePid ($table, $uid)
 
array doesRecordExist ($table, $uid, $fields='')
 
string getRecordPath ($pid)
 
string renderSelectBox ($prefix, $value, $optValues)
 
string compareRecords ($databaseRecord, $importRecord, $table, $inverseDiff=false)
 
string null getRTEoriginalFilename ($string)
 
ExtendedFileUtility getFileProcObj ()
 
 callHook ($name, $params)
 
TYPO3 CMS Impexp ImportExport setExcludeDisabledRecords ($excludeDisabledRecords=false)
 
 error ($msg)
 
string printErrorLog ()
 

Public Attributes

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

Protected Member Functions

 initializeImport ()
 
 initializeStorageObjects ()
 
 writeSysFileStorageRecords ()
 
bool isEquivalentObjectStorage (ResourceStorage $storageObject, array $storageRecord)
 
 writeSysFileRecords ()
 
 removeSysFileReferenceRecordsFromImportDataWithRelationToMissingFile ()
 
bool isFallbackStorage ($storageId)
 
 fixUidLocalInSysFileReferenceRecords ($oldFileUid, $newFileUid)
 
bool array fetchStorageRecords ()
 
string writeTemporaryFileFromData ($fileId, $dataKey='files_fal')
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Impexp\ImportExport
bool isActive ($table, $uid)
 
 excludePageAndRecords ($pageUid, $pageTree)
 
 addGeneralErrorsByTable ($table)
 
string getTemporaryFolderName ()
 
BackendUserAuthentication getBackendUser ()
 
LanguageService getLanguageService ()
 

Protected Attributes

ResourceStorage[] $storageObjects = array( )
 
string null $filesPathForImport
 
array $unlinkFiles = array( )
 
array $alternativeFileName = array( )
 
array $alternativeFilePath = array( )
 
array $filePathMap = array( )
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Impexp\ImportExport
ExtendedFileUtility $fileProcObj
 
array $remainHeader = array( )
 
IconFactory $iconFactory
 
bool $excludeDisabledRecords = false
 

Detailed Description

T3D file Import library (TYPO3 Record Document)

this is not part of TYPO3's Core API.

Definition at line 39 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$table‪Table name (from import memory)
int$uid‪Record UID (from import memory)
int$pid‪Page id
See also
‪writeRecords()

Definition at line 803 of file Import.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Impexp\ImportExport\doesRecordExist(), TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Impexp\ImportExport\getBackendUser(), 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$substNEWwithIDs‪From DataHandler to be merged into internal mapping variable in this object
See also
‪writeRecords()

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

array TYPO3\CMS\Impexp\Import::checkImportPrerequisites ( )

◆ checkOrCreateDir()

bool 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$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 1614 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\error(), and TYPO3\CMS\Core\Core\Environment\getPublicPath().

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

◆ fetchStorageRecords()

bool array 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 526 of file Import.php.

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

◆ 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

Definition at line 504 of file Import.php.

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

◆ flatInversePageTree_pid()

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

Recursively flattening the idH array, setting PIDs as values

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

Definition at line 670 of file Import.php.

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

◆ getNewTCE()

◆ getNextContentPart()

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

Returns the next content part from the $filecontent

Parameters
string$filecontent‪File content string
int$pointer‪File pointer (where to read from)
bool$unserialize‪If set, the returned content is unserialized into an array, otherwise you get the raw string
string$name‪For error messages this indicates the section of the problem.
Returns
‪string|null Data string

Definition at line 1774 of file Import.php.

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

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

◆ getNextFilePart()

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

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

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

Definition at line 1714 of file Import.php.

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

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

◆ import_addFileNameToBeCopied()

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

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

Parameters
array$fI‪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
‪string|null Absolute filename of the temporary filename of the file. In ->alternativeFileName the original name is set.

Definition at line 1087 of file Import.php.

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

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

◆ importData()

◆ init()

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

Init the object

Reimplemented from TYPO3\CMS\Impexp\ImportExport.

Definition at line 107 of file Import.php.

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

◆ initializeImport()

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

Initialize all settings for the import

Definition at line 120 of file Import.php.

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

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

◆ initializeStorageObjects()

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

Initialize the all present storage objects

Definition at line 140 of file Import.php.

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

◆ isEquivalentObjectStorage()

bool 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$storageObject‪The storage object which should get compared
array$storageRecord‪The storage record which should get compared
Returns
‪bool Returns TRUE when both object storages can be seen as equivalent

Definition at line 241 of file Import.php.

References TYPO3\CMS\Core\Resource\ResourceFactory\convertFlexFormDataToConfigurationArray(), 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()

bool 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 484 of file Import.php.

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

◆ 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$filecontent‪File content

Definition at line 1756 of file Import.php.

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

◆ loadFile()

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

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

Parameters
string$filename‪Filename, absolute
bool$all‪If 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 1651 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Impexp\Import\getNextFilePart(), TYPO3\CMS\Impexp\ImportExport\getTemporaryFolderName(), and TYPO3\CMS\Impexp\Import\loadInit().

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

◆ loadInit()

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

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

Definition at line 1804 of file Import.php.

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

◆ processSoftReferences()

◆ processSoftReferences_flexFormCallBack()

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

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

◆ processSoftReferences_saveFile()

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

◆ processSoftReferences_saveFile_createRelFile()

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

Create file in directory and return the new (unique) filename

Parameters
string$origDirPrefix‪Directory prefix, relative, with trailing slash
string$fileName‪Filename (without path)
string$fileID‪File ID from import memory
string$table‪Table for which the processing occurs
string$uid‪UID of record from table
Returns
‪string|null New relative filename, if any

Definition at line 1486 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\$fileProcObj, TYPO3\CMS\Core\Utility\PathUtility\basename(), TYPO3\CMS\Impexp\Import\checkOrCreateDir(), TYPO3\CMS\Core\Utility\PathUtility\dirname(), TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Impexp\ImportExport\getFileProcObj(), TYPO3\CMS\Core\Core\Environment\getPublicPath(), TYPO3\CMS\Core\Utility\File\BasicFileUtility\getUniqueName(), TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix(), TYPO3\CMS\Impexp\ImportExport\verifyFolderAccess(), and TYPO3\CMS\Impexp\Import\writeFileVerify().

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

◆ processSoftReferences_substTokens()

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

Substition of softreference tokens

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

Definition at line 1362 of file Import.php.

References 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(), and TYPO3\CMS\Impexp\Import\processSoftReferences_flexFormCallBack().

◆ remapListedDBRecords_flexFormCallBack()

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

References TYPO3\CMS\Impexp\Import\import_addFileNameToBeCopied(), and TYPO3\CMS\Impexp\Import\setRelations_db().

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

Definition at line 458 of file Import.php.

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

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

◆ 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!

See also
setRelations()

Definition at line 1122 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\$dat, $GLOBALS, TYPO3\CMS\Impexp\ImportExport\callHook(), TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Impexp\Import\getNewTCE(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Backend\Utility\BackendUtility\wsMapId().

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

See also
setFlexFormRelations()

Definition at line 976 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\$dat, $GLOBALS, TYPO3\CMS\Impexp\ImportExport\callHook(), TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Impexp\Import\getNewTCE(), TYPO3\CMS\Impexp\Import\import_addFileNameToBeCopied(), TYPO3\CMS\Impexp\Import\setRelations_db(), and TYPO3\CMS\Backend\Utility\BackendUtility\wsMapId().

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

◆ setRelations_db()

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

Maps relations for database

Parameters
array$itemArray‪Array of item sets (table/uid) from a dbAnalysis object
array$itemConfig‪Array 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 DataHandler-input group/select type which means they will automatically be processed into a uid-list or MM relations.

Definition at line 1043 of file Import.php.

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

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

Definition at line 953 of file Import.php.

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

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

◆ writeFileVerify()

bool 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 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 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 1570 of file Import.php.

References TYPO3\CMS\Impexp\ImportExport\$fileProcObj, TYPO3\CMS\Core\Utility\File\BasicFileUtility\checkIfAllowed(), TYPO3\CMS\Core\Utility\PathUtility\dirname(), TYPO3\CMS\Impexp\ImportExport\error(), TYPO3\CMS\Impexp\ImportExport\getFileProcObj(), TYPO3\CMS\Core\Resource\ResourceFactory\getFolderObjectFromCombinedIdentifier(), and TYPO3\CMS\Core\Resource\ResourceFactory\getInstance().

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$pid‪PID 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
See also
writeRecords_records()

Definition at line 573 of file Import.php.

References TYPO3\CMS\Impexp\Import\$suggestedInsertUids, 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.

See also
writeRecords_pages(), writeRecords_records_order()

Definition at line 628 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)

◆ writeSysFileRecords()

◆ writeSysFileStorageRecords()

◆ writeTemporaryFileFromData()

string 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 548 of file Import.php.

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

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

Member Data Documentation

◆ $alternativeFileName

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

Definition at line 90 of file Import.php.

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

◆ $alternativeFilePath

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

Definition at line 94 of file Import.php.

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

◆ $enableLogging

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

Disable logging when importing

Definition at line 52 of file Import.php.

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

◆ $filePathMap

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

Definition at line 98 of file Import.php.

◆ $filesPathForImport

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

Definition at line 82 of file Import.php.

◆ $import_data

array TYPO3\CMS\Impexp\Import::$import_data = array( )

Internal data accumulation for writing records during import

Definition at line 72 of file Import.php.

◆ $import_newId

array TYPO3\CMS\Impexp\Import::$import_newId = array( )

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 60 of file Import.php.

◆ $import_newId_pids

array TYPO3\CMS\Impexp\Import::$import_newId_pids = array( )

Page id map for page tree (import)

Definition at line 66 of file Import.php.

◆ $storageObjects

ResourceStorage [] TYPO3\CMS\Impexp\Import::$storageObjects = array( )
protected

Array of current registered storage objects

Definition at line 78 of file Import.php.

◆ $suggestedInsertUids

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

Used to register the forged 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 46 of file Import.php.

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

◆ $unlinkFiles

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

Definition at line 86 of file Import.php.