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

Public Member Functions

 __construct ()
 
 process ()
 
 setPageTree (array $pageTree)
 
 setRecordTypesIncludeFields (array $recordTypesIncludeFields)
 
 exportAddRecord (string $table, array $row, int $relationLevel=0)
 
 fixFileIdInRelations (array &$relations)
 
 removeRedundantSoftRefsInRelations (array &$relations)
 
string render ()
 
File saveToFile ()
 
string getExportFileName ()
 
 setExportFileName (string $exportFileName)
 
string getOrGenerateExportFileNameWithFileExtension ()
 
string getExportFileType ()
 
 setExportFileType (string $exportFileType)
 
array getSupportedFileTypes ()
 
string getTitle ()
 
 setTitle (string $title)
 
string getDescription ()
 
 setDescription (string $description)
 
string getNotes ()
 
 setNotes (string $notes)
 
array getRecord ()
 
 setRecord (array $record)
 
array getList ()
 
 setList (array $list)
 
int getLevels ()
 
 setLevels (int $levels)
 
array getTables ()
 
 setTables (array $tables)
 
array getRelOnlyTables ()
 
 setRelOnlyTables (array $relOnlyTables)
 
string getTreeHTML ()
 
bool isIncludeExtFileResources ()
 
 setIncludeExtFileResources (bool $includeExtFileResources)
 
 setSaveFilesOutsideExportFile (bool $saveFilesOutsideExportFile)
 
bool isSaveFilesOutsideExportFile ()
 
- ‪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 LEVELS_RECORDS_ON_THIS_PAGE = -2
 
const LEVELS_EXPANDED_TREE = -1
 
const LEVELS_INFINITE = 999
 
const FILETYPE_XML = 'xml'
 
const FILETYPE_T3D = 't3d'
 
const FILETYPE_T3DZ = 't3d_compressed'
 

Protected Member Functions

 initializeExport ()
 
 setHeaderBasics ()
 
 setMetaData ()
 
 removeExcludedPagesFromPageTree (array &$pageTree)
 
 setRecordTypeIncludeFields (string $table, array $fields)
 
string getExcludePagesClause ()
 
 addRecordsForPid (int $pid, array $tables)
 
Result execListQueryPid (int $pid, string $table)
 
bool isPageInWebMount (int $pid)
 
array filterRecordFields (string $table, array $row)
 
array flatDbRelations (array $relations)
 
array flatSoftRefs (array $relations)
 
int exportAddRecordsFromRelations (int $relationLevel=0)
 
 exportAddRecordsFromRelationsPushRelation (array $recordData, array &$addRecords, string $tokenID='')
 
bool inclRelation (string $table)
 
 exportAddFilesFromRelations ()
 
 exportAddFile (array $fileData, string $recordRef='', string $field='')
 
 exportAddFilesFromSysFilesRecords ()
 
 exportAddSysFile (array $fileData)
 
string createXML ()
 
string addFilePart (string $data)
 
string generateExportFileName ()
 
string getFileExtensionByFileType ()
 
- ‪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 = 'export'
 
string $title = ''
 
string $description = ''
 
string $notes = ''
 
array $record = array( )
 
array $list = array( )
 
int $levels = 0
 
array $tables = array( )
 
array $relOnlyTables = array( )
 
string $treeHTML = ''
 
bool $includeExtFileResources = true
 
string $extFileResourceExtensions = 'html,htm,css'
 
array $recordTypesIncludeFields = array( )
 
array $defaultRecordIncludeFields = array( 'uid', 'pid' )
 
bool $saveFilesOutsideExportFile = false
 
string $exportFileName = ''
 
string $exportFileType = self::FILETYPE_XML
 
array $supportedFileTypes = array( )
 
bool $compressionAvailable = false
 
array $pageInWebMountCache = array( )
 
- ‪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
 

Detailed Description

T3D file Export library (TYPO3 Record Document)

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

Definition at line 47 of file Export.php.

Constructor & Destructor Documentation

◆ __construct()

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

The constructor

Reimplemented from TYPO3\CMS\Impexp\ImportExport.

Definition at line 156 of file Export.php.

Member Function Documentation

◆ addFilePart()

string TYPO3\CMS\Impexp\Export::addFilePart ( string  $data)
protected

Returns a content part for a filename being build.

Parameters
string$data‪Data to store in part
Returns
‪string Content stream.

Definition at line 1275 of file Export.php.

References TYPO3\CMS\Impexp\Export\FILETYPE_T3DZ.

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

◆ addRecordsForPid()

TYPO3\CMS\Impexp\Export::addRecordsForPid ( int  $pid,
array  $tables 
)
protected

Adds records to the export object for a specific page id.

Parameters
int$pid‪Page id for which to select records to add
array$tables‪Array of table names to select from

Definition at line 404 of file Export.php.

References $GLOBALS, TYPO3\CMS\Impexp\Export\$record, TYPO3\CMS\Impexp\Export\$tables, TYPO3\CMS\Impexp\Export\execListQueryPid(), TYPO3\CMS\Impexp\Export\exportAddRecord(), and TYPO3\CMS\Impexp\ImportExport\getBackendUser().

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

◆ createXML()

string TYPO3\CMS\Impexp\Export::createXML ( )
protected

Creates XML string from input array

Returns
‪string XML content

Definition at line 1175 of file Export.php.

References TYPO3\CMS\Core\Serializer\Typo3XmlParserOptions\ROOT_NODE_NAME.

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

◆ execListQueryPid()

Result TYPO3\CMS\Impexp\Export::execListQueryPid ( int  $pid,
string  $table 
)
protected

Selects records from table / pid

Parameters
int$pid‪Page ID to select from
string$table‪Table to select from
Returns
‪Result Query statement

Definition at line 429 of file Export.php.

References $GLOBALS, TYPO3\CMS\Impexp\ImportExport\$pid, TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Core\Database\Query\QueryHelper\parseOrderBy().

Referenced by TYPO3\CMS\Impexp\Export\addRecordsForPid(), and TYPO3\CMS\Impexp\Export\process().

◆ exportAddFile()

TYPO3\CMS\Impexp\Export::exportAddFile ( array  $fileData,
string  $recordRef = '',
string  $field = '' 
)
protected

This adds the file to the export

  • ‪either as content or external file
Parameters
array$fileData‪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". "relFileName" is optional for files attached to records, but mandatory for soft referenced files (since the relFileName determines where such a file should be stored!)
string$recordRef‪If the file is related to a record, this is the id of the form [table]:[id]. Information purposes only.
string$field‪If the file is related to a record, this is the field name it was related to. Information purposes only.

Definition at line 964 of file Export.php.

References $GLOBALS, TYPO3\CMS\Impexp\ImportExport\addError(), TYPO3\CMS\Core\Utility\PathUtility\basename(), TYPO3\CMS\Core\Utility\PathUtility\dirname(), TYPO3\CMS\Impexp\ImportExport\getFileadminFolderName(), TYPO3\CMS\Impexp\ImportExport\getOrCreateTemporaryFolderName(), TYPO3\CMS\Core\Core\Environment\getPublicPath(), and TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

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

◆ exportAddFilesFromRelations()

TYPO3\CMS\Impexp\Export::exportAddFilesFromRelations ( )
protected

◆ exportAddFilesFromSysFilesRecords()

TYPO3\CMS\Impexp\Export::exportAddFilesFromSysFilesRecords ( )
protected

This adds all files from sys_file records

Definition at line 1082 of file Export.php.

References TYPO3\CMS\Impexp\Export\exportAddSysFile().

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

◆ exportAddRecord()

TYPO3\CMS\Impexp\Export::exportAddRecord ( string  $table,
array  $row,
int  $relationLevel = 0 
)

◆ exportAddRecordsFromRelations()

int TYPO3\CMS\Impexp\Export::exportAddRecordsFromRelations ( int  $relationLevel = 0)
protected

This analyzes the existing added records, finds all database relations to records and adds these records to the export file. This function can be called repeatedly until it returns zero added records. In principle it should not allow to infinite recursion, but you better set a limit... Call this BEFORE the exportAddFilesFromRelations (so files from added relations are also included of course)

Parameters
int$relationLevel‪Recursion level
Returns
‪int number of records from relations found and added
See also
exportAddFilesFromRelations()

Definition at line 730 of file Export.php.

References TYPO3\CMS\Impexp\Export\$record, TYPO3\CMS\Impexp\ImportExport\addError(), TYPO3\CMS\Impexp\Export\exportAddRecord(), TYPO3\CMS\Impexp\Export\exportAddRecordsFromRelationsPushRelation(), and TYPO3\CMS\Impexp\ImportExport\isSoftRefIncluded().

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

◆ exportAddRecordsFromRelationsPushRelation()

TYPO3\CMS\Impexp\Export::exportAddRecordsFromRelationsPushRelation ( array  $recordData,
array &  $addRecords,
string  $tokenID = '' 
)
protected

Helper function for exportAddRecordsFromRelations()

Parameters
array$recordData‪Record of relation with table/id key to add to $addRecords
array$addRecords‪Records of relations which are already marked as to be added to the export
string$tokenID‪Soft reference token ID, if applicable.
See also
exportAddRecordsFromRelations()

Definition at line 833 of file Export.php.

References $GLOBALS, TYPO3\CMS\Impexp\Export\inclRelation(), TYPO3\CMS\Impexp\ImportExport\isRecordExcluded(), TYPO3\CMS\Impexp\ImportExport\isSoftRefIncluded(), and TYPO3\CMS\Impexp\ImportExport\isTableStatic().

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

◆ exportAddSysFile()

TYPO3\CMS\Impexp\Export::exportAddSysFile ( array  $fileData)
protected

This adds the file from a sys_file record to the export

  • ‪either as content or external file
Parameters
array$fileData
Exceptions

Definition at line 1100 of file Export.php.

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

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

◆ filterRecordFields()

array TYPO3\CMS\Impexp\Export::filterRecordFields ( string  $table,
array  $row 
)
protected

If include fields for a specific record type are set, the data are filtered out with fields are not included in the fields. Used in tests only.

Parameters
string$table‪The record type to be filtered
array$row‪The data to be filtered
Returns
‪array The filtered record row

Definition at line 544 of file Export.php.

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

◆ fixFileIdInRelations()

TYPO3\CMS\Impexp\Export::fixFileIdInRelations ( array &  $relations)

This changes the file reference ID from a hash based on the absolute file path (coming from ReferenceIndex) to a hash based on the relative file path.

Public access for testing purpose only.

Parameters
array$relations

Definition at line 571 of file Export.php.

References TYPO3\CMS\Core\Core\Environment\getPublicPath(), and TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

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

◆ flatDbRelations()

array TYPO3\CMS\Impexp\Export::flatDbRelations ( array  $relations)
protected

Database relations flattened to 1-dimensional array. The list will be unique, no table/uid combination will appear twice.

Parameters
array$relations‪2-dimensional array of database relations organized by table key
Returns
‪array 1-dimensional array where entries are table:uid and keys are array with table/id

Definition at line 647 of file Export.php.

References TYPO3\CMS\Impexp\Export\$list.

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

◆ flatSoftRefs()

array TYPO3\CMS\Impexp\Export::flatSoftRefs ( array  $relations)
protected

Soft references flattened to 1-dimensional array.

Parameters
array$relations‪2-dimensional array of database relations organized by table key
Returns
‪array 1-dimensional array where entries are arrays with properties of the soft link found and keys are a unique combination of field, spKey, structure path if applicable and token ID

Definition at line 675 of file Export.php.

References TYPO3\CMS\Impexp\Export\$list, and TYPO3\CMS\Core\Core\Environment\getPublicPath().

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

◆ generateExportFileName()

string TYPO3\CMS\Impexp\Export::generateExportFileName ( )
protected

◆ getDescription()

string TYPO3\CMS\Impexp\Export::getDescription ( )
Returns
‪string

Definition at line 1461 of file Export.php.

References TYPO3\CMS\Impexp\Export\$description.

◆ getExcludePagesClause()

string TYPO3\CMS\Impexp\Export::getExcludePagesClause ( )
protected

Filter page IDs by traversing the exclude map, finding all excluded pages (if any) and making an AND NOT IN statement for the select clause.

Returns
‪string AND where clause part to filter out page uids.

Definition at line 382 of file Export.php.

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

◆ getExportFileName()

string TYPO3\CMS\Impexp\Export::getExportFileName ( )
Returns
‪string

Definition at line 1325 of file Export.php.

References TYPO3\CMS\Impexp\Export\$exportFileName.

◆ getExportFileType()

string TYPO3\CMS\Impexp\Export::getExportFileType ( )
Returns
‪string

Definition at line 1379 of file Export.php.

References TYPO3\CMS\Impexp\Export\$exportFileType.

◆ getFileExtensionByFileType()

string TYPO3\CMS\Impexp\Export::getFileExtensionByFileType ( )
protected

◆ getLevels()

int TYPO3\CMS\Impexp\Export::getLevels ( )
Returns
‪int

Definition at line 1525 of file Export.php.

References TYPO3\CMS\Impexp\Export\$levels.

◆ getList()

array TYPO3\CMS\Impexp\Export::getList ( )
Returns
‪array

Definition at line 1509 of file Export.php.

References TYPO3\CMS\Impexp\Export\$list.

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

◆ getNotes()

string TYPO3\CMS\Impexp\Export::getNotes ( )
Returns
‪string

Definition at line 1477 of file Export.php.

References TYPO3\CMS\Impexp\Export\$notes.

◆ getOrGenerateExportFileNameWithFileExtension()

string TYPO3\CMS\Impexp\Export::getOrGenerateExportFileNameWithFileExtension ( )

◆ getRecord()

array TYPO3\CMS\Impexp\Export::getRecord ( )
Returns
‪array

Definition at line 1493 of file Export.php.

References TYPO3\CMS\Impexp\Export\$record.

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

◆ getRelOnlyTables()

array TYPO3\CMS\Impexp\Export::getRelOnlyTables ( )
Returns
‪array

Definition at line 1557 of file Export.php.

References TYPO3\CMS\Impexp\Export\$relOnlyTables.

◆ getSupportedFileTypes()

array TYPO3\CMS\Impexp\Export::getSupportedFileTypes ( )

◆ getTables()

array TYPO3\CMS\Impexp\Export::getTables ( )
Returns
‪array

Definition at line 1541 of file Export.php.

References TYPO3\CMS\Impexp\Export\$tables.

◆ getTitle()

string TYPO3\CMS\Impexp\Export::getTitle ( )
Returns
‪string

Definition at line 1445 of file Export.php.

References TYPO3\CMS\Impexp\Export\$title.

◆ getTreeHTML()

string TYPO3\CMS\Impexp\Export::getTreeHTML ( )
Returns
‪string

Definition at line 1573 of file Export.php.

References TYPO3\CMS\Impexp\Export\$treeHTML.

◆ inclRelation()

bool TYPO3\CMS\Impexp\Export::inclRelation ( string  $table)
protected

Returns TRUE if the input table name is to be included as relation

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

Definition at line 853 of file Export.php.

References $GLOBALS, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\check(), and TYPO3\CMS\Impexp\ImportExport\getBackendUser().

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

◆ initializeExport()

TYPO3\CMS\Impexp\Export::initializeExport ( )
protected

Initialize all settings for the export

Definition at line 259 of file Export.php.

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

◆ isIncludeExtFileResources()

bool TYPO3\CMS\Impexp\Export::isIncludeExtFileResources ( )
Returns
‪bool

Definition at line 1581 of file Export.php.

References TYPO3\CMS\Impexp\Export\$includeExtFileResources.

◆ isPageInWebMount()

bool TYPO3\CMS\Impexp\Export::isPageInWebMount ( int  $pid)
protected

Checking if a page is in the web mounts of the user

Parameters
int$pid‪Page ID to check
Returns
‪bool TRUE if OK

Definition at line 527 of file Export.php.

References TYPO3\CMS\Impexp\ImportExport\$pid, TYPO3\CMS\Impexp\ImportExport\getBackendUser(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isInWebMount().

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

◆ isSaveFilesOutsideExportFile()

bool TYPO3\CMS\Impexp\Export::isSaveFilesOutsideExportFile ( )
Returns
‪bool

Definition at line 1609 of file Export.php.

References TYPO3\CMS\Impexp\Export\$saveFilesOutsideExportFile.

◆ process()

◆ removeExcludedPagesFromPageTree()

TYPO3\CMS\Impexp\Export::removeExcludedPagesFromPageTree ( array &  $pageTree)
protected

Removes entries in the page tree which are found in ->excludeMap[]

Parameters
array$pageTree‪Hierarchy of ids, the page tree

Definition at line 331 of file Export.php.

References TYPO3\CMS\Impexp\ImportExport\$pid, and TYPO3\CMS\Impexp\ImportExport\isRecordExcluded().

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

◆ removeRedundantSoftRefsInRelations()

TYPO3\CMS\Impexp\Export::removeRedundantSoftRefsInRelations ( array &  $relations)

Relations could contain db relations to sys_file records. Some configuration combinations of TCA and SoftReferenceIndex create also soft reference relation entries for the identical file. This results in double included files, one in array "files" and one in array "file_fal". This function checks the relations for this double inclusions and removes the redundant soft reference relation.

Public access for testing purpose only.

Parameters
array$relations

Definition at line 612 of file Export.php.

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

◆ render()

string TYPO3\CMS\Impexp\Export::render ( )

This compiles and returns the data content for an exported file

  • ‪"xml" gives xml
  • ‪"t3d" and "t3d_compressed" gives serialized array, possibly compressed
Returns
‪string The output file stream

Definition at line 1152 of file Export.php.

References TYPO3\CMS\Impexp\Export\addFilePart(), and TYPO3\CMS\Impexp\Export\createXML().

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

◆ saveToFile()

◆ setDescription()

TYPO3\CMS\Impexp\Export::setDescription ( string  $description)
Parameters
string$description

Definition at line 1469 of file Export.php.

References TYPO3\CMS\Impexp\Export\$description.

◆ setExportFileName()

TYPO3\CMS\Impexp\Export::setExportFileName ( string  $exportFileName)
Parameters
string$exportFileName

Definition at line 1333 of file Export.php.

References TYPO3\CMS\Impexp\Export\$exportFileName.

◆ setExportFileType()

TYPO3\CMS\Impexp\Export::setExportFileType ( string  $exportFileType)

◆ setHeaderBasics()

◆ setIncludeExtFileResources()

TYPO3\CMS\Impexp\Export::setIncludeExtFileResources ( bool  $includeExtFileResources)
Parameters
bool$includeExtFileResources

Definition at line 1589 of file Export.php.

References TYPO3\CMS\Impexp\Export\$includeExtFileResources.

◆ setLevels()

TYPO3\CMS\Impexp\Export::setLevels ( int  $levels)

◆ setList()

TYPO3\CMS\Impexp\Export::setList ( array  $list)
Parameters
array$list

Definition at line 1517 of file Export.php.

References TYPO3\CMS\Impexp\Export\$list.

◆ setMetaData()

TYPO3\CMS\Impexp\Export::setMetaData ( )
protected

◆ setNotes()

TYPO3\CMS\Impexp\Export::setNotes ( string  $notes)
Parameters
string$notes

Definition at line 1485 of file Export.php.

References TYPO3\CMS\Impexp\Export\$notes.

◆ setPageTree()

TYPO3\CMS\Impexp\Export::setPageTree ( array  $pageTree)

Sets the page-tree array in the export header

Parameters
array$pageTree‪Hierarchy of ids, the page tree: array([uid] => array("uid" => [uid], "subrow" => array(.....)), [uid] => ....)

Definition at line 321 of file Export.php.

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

◆ setRecord()

TYPO3\CMS\Impexp\Export::setRecord ( array  $record)
Parameters
array$record

Definition at line 1501 of file Export.php.

References TYPO3\CMS\Impexp\Export\$record.

◆ setRecordTypeIncludeFields()

TYPO3\CMS\Impexp\Export::setRecordTypeIncludeFields ( string  $table,
array  $fields 
)
protected

Sets the fields of a record type to be included in the export. Used in tests only.

Parameters
string$table‪The record type
array$fields‪The fields to be included

Definition at line 371 of file Export.php.

References $fields.

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

◆ setRecordTypesIncludeFields()

TYPO3\CMS\Impexp\Export::setRecordTypesIncludeFields ( array  $recordTypesIncludeFields)

Sets the fields of record types to be included in the export. Used in tests only.

Parameters
array$recordTypesIncludeFields‪The key is the record type, the value is an array of fields to be included in the export.
Exceptions
Exception‪if an array value is not type of array

Definition at line 354 of file Export.php.

References $fields, TYPO3\CMS\Impexp\Export\$recordTypesIncludeFields, and TYPO3\CMS\Impexp\Export\setRecordTypeIncludeFields().

Referenced by TYPO3\CMS\Impexp\Tests\Functional\Export\PagesAndTtContentWithImagesTest\compileExportPagesAndRelatedTtContentWithImages().

◆ setRelOnlyTables()

TYPO3\CMS\Impexp\Export::setRelOnlyTables ( array  $relOnlyTables)

◆ setSaveFilesOutsideExportFile()

TYPO3\CMS\Impexp\Export::setSaveFilesOutsideExportFile ( bool  $saveFilesOutsideExportFile)

Option to enable having the files not included in the export file. The files are saved to a temporary folder instead.

Parameters
bool$saveFilesOutsideExportFile
See also
ImportExport::getOrCreateTemporaryFolderName()

Definition at line 1601 of file Export.php.

References TYPO3\CMS\Impexp\Export\$saveFilesOutsideExportFile.

◆ setTables()

TYPO3\CMS\Impexp\Export::setTables ( array  $tables)

◆ setTitle()

TYPO3\CMS\Impexp\Export::setTitle ( string  $title)
Parameters
string$title

Definition at line 1453 of file Export.php.

References TYPO3\CMS\Impexp\Export\$title.

Member Data Documentation

◆ $compressionAvailable

bool TYPO3\CMS\Impexp\Export::$compressionAvailable = false
protected

Definition at line 145 of file Export.php.

◆ $defaultRecordIncludeFields

array TYPO3\CMS\Impexp\Export::$defaultRecordIncludeFields = array( 'uid', 'pid' )
protected

Default array of fields to be included in the export

Definition at line 125 of file Export.php.

◆ $description

string TYPO3\CMS\Impexp\Export::$description = ''
protected

◆ $exportFileName

◆ $exportFileType

string TYPO3\CMS\Impexp\Export::$exportFileType = self::FILETYPE_XML
protected

◆ $extFileResourceExtensions

string TYPO3\CMS\Impexp\Export::$extFileResourceExtensions = 'html,htm,css'
protected

Files with external media (HTML/css style references inside)

Definition at line 110 of file Export.php.

◆ $includeExtFileResources

bool TYPO3\CMS\Impexp\Export::$includeExtFileResources = true
protected

If set, HTML file resources are included.

Definition at line 104 of file Export.php.

Referenced by TYPO3\CMS\Impexp\Export\isIncludeExtFileResources(), and TYPO3\CMS\Impexp\Export\setIncludeExtFileResources().

◆ $levels

◆ $list

array TYPO3\CMS\Impexp\Export::$list = array( )
protected

◆ $mode

string TYPO3\CMS\Impexp\Export::$mode = 'export'
protected

Definition at line 59 of file Export.php.

◆ $notes

string TYPO3\CMS\Impexp\Export::$notes = ''
protected

◆ $pageInWebMountCache

array TYPO3\CMS\Impexp\Export::$pageInWebMountCache = array( )
protected

Cache for checks if page is in user web mounts.

Definition at line 151 of file Export.php.

◆ $record

◆ $recordTypesIncludeFields

array TYPO3\CMS\Impexp\Export::$recordTypesIncludeFields = array( )
protected

The key is the record type (e.g. 'be_users'), the value is an array of fields to be included in the export.

Used in tests only.

Definition at line 119 of file Export.php.

Referenced by TYPO3\CMS\Impexp\Tests\Functional\Export\PagesAndTtContentWithImagesTest\compileExportPagesAndRelatedTtContentWithImages(), TYPO3\CMS\Impexp\Tests\Functional\Export\IrreTutorialRecordsTest\exportIrreRecords(), and TYPO3\CMS\Impexp\Export\setRecordTypesIncludeFields().

◆ $relOnlyTables

array TYPO3\CMS\Impexp\Export::$relOnlyTables = array( )
protected

Add table names here which are THE ONLY ones which will be included into export if found as relations. '_ALL' will allow all tables.

Definition at line 94 of file Export.php.

Referenced by TYPO3\CMS\Impexp\Export\getRelOnlyTables(), and TYPO3\CMS\Impexp\Export\setRelOnlyTables().

◆ $saveFilesOutsideExportFile

bool TYPO3\CMS\Impexp\Export::$saveFilesOutsideExportFile = false
protected

◆ $supportedFileTypes

array TYPO3\CMS\Impexp\Export::$supportedFileTypes = array( )
protected

◆ $tables

◆ $title

string TYPO3\CMS\Impexp\Export::$title = ''
protected

◆ $treeHTML

string TYPO3\CMS\Impexp\Export::$treeHTML = ''
protected

Definition at line 98 of file Export.php.

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

◆ FILETYPE_T3D

◆ FILETYPE_T3DZ

◆ FILETYPE_XML

◆ LEVELS_EXPANDED_TREE

◆ LEVELS_INFINITE

◆ LEVELS_RECORDS_ON_THIS_PAGE