Documentation TYPO3 par Ameos

tx_impexp Class Reference

List of all members.

Public Member Functions

 init ($dontCompress=0)
 setMetaData ($title, $description, $notes, $packager_username, $packager_name, $packager_email)
 addThumbnail ($imgFilepath)
 setPageTree ($idH)
 flatInversePageTree ($idH, $a=array())
 export_addRecord ($table, $row, $relationLevel=0)
 export_addDBRelations ($relationLevel=0)
 export_addFilesFromRelations ()
 getRelations ($table, $row)
 flatDBrels ($dbrels)
 loadContent ($filecontent)
 getNextContentPart ($filecontent, &$pointer, $unserialize=0, $name='')
 loadFile ($filename, $all=0)
 getNextFilePart ($fd, $unserialize=0, $name='')
 compileMemoryToFileContent ()
 doOutputCompress ()
 addFilePart ($data, $compress=0)
 error ($msg)
 printErrorLog ()
 destPathFromUploadFolder ($folder)
 importData ($pid)
 getNewTCE ()
 setRelations ()
 addToMapId ($substNEWwithIDs)
 initImportVars ()
 unlinkTempFiles ()
 addSingle ($table, $uid, $pid)
 import_addFileNameToBeCopied ($fI)
 getTempPathFileName ($fN)
 displayContentOverview ()
 traversePageTree ($pT, &$lines, $preCode='')
 traversePageRecords ($pT, &$lines)
 traverseallrecords ($pT, &$lines)
 singleRecordLines ($table, $uid, &$lines, $preCode, $checkImportInPidRecord=0)
 addRelations ($rels, &$lines, $preCode, $recurCheck=array())
 checkDokType ($checkTable, $doktype)

Public Attributes

 $maxFileSize = 1000000
 $maxRecordSize = 1000000
 $maxExportSize = 10000000
 $dat = array()
 $display_import_pid_record = ''
 $import_mapId = array()
 $import_newId = array()
 $import_newId_pids = array()
 $errorLog = array()
 $relExclTables = array()
 $relOnlyTables = array()
 $compress = 0
 $dontCompress = 0

Detailed Description

Definition at line 98 of file class.tx_impexp.php.


Member Function Documentation

tx_impexp::addFilePart data,
compress = 0
 

Returns a content part for a filename being build.

Parameters:
[type] $data: ...
[type] $compress: ...
Returns:
[type] ...

Definition at line 570 of file class.tx_impexp.php.

References $compress.

Referenced by compileMemoryToFileContent().

tx_impexp::addRelations rels,
&$  lines,
preCode,
recurCheck = array()
 

Add relations entries for a record's rels-array

Parameters:
[type] $rels: ...
[type] $lines: ...
[type] $preCode: ...
[type] $recurCheck: ...
Returns:
[type] ...

Definition at line 1141 of file class.tx_impexp.php.

References t3lib_div::modifyHTMLColor().

tx_impexp::addSingle table,
uid,
pid
 

Adds a single record to the $importData array. Also copies files to tempfolder. However all references are set to blank for now.

Parameters:
[type] $table: ...
[type] $uid: ...
[type] $pid: ...
Returns:
[type] ...

Definition at line 841 of file class.tx_impexp.php.

Referenced by importData().

tx_impexp::addThumbnail imgFilepath  ) 
 

Sets a thumbnail image to the exported file

Parameters:
[type] $imgFilepath: ...
Returns:
[type] ...

Definition at line 160 of file class.tx_impexp.php.

tx_impexp::addToMapId substNEWwithIDs  ) 
 

Registers the substNEWids in memory.

Parameters:
[type] $substNEWwithIDs: ...
Returns:
[type] ...

Definition at line 788 of file class.tx_impexp.php.

Referenced by importData().

tx_impexp::checkDokType checkTable,
doktype
 

Verifies that a table is allowed on a certain doktype of a page

Parameters:
[type] $checkTable: ...
[type] $doktype: ...
Returns:
[type] ...

Definition at line 1183 of file class.tx_impexp.php.

References t3lib_div::trimExplode().

tx_impexp::compileMemoryToFileContent  ) 
 

This compiles and returns the data content for an exported file

Returns:
[type] ...

Definition at line 538 of file class.tx_impexp.php.

References $compress, addFilePart(), and doOutputCompress().

tx_impexp::destPathFromUploadFolder folder  ) 
 

Returns destination path to an upload folder given by $folder

Parameters:
[type] $folder: ...
Returns:
[type] ...

Definition at line 600 of file class.tx_impexp.php.

Referenced by getRelations().

tx_impexp::displayContentOverview  ) 
 

Displays an overview of the header-content.

Returns:
[type] ...

Definition at line 926 of file class.tx_impexp.php.

tx_impexp::doOutputCompress  ) 
 

Returns true if the output should be compressed.

Returns:
[type] ...

Definition at line 559 of file class.tx_impexp.php.

Referenced by compileMemoryToFileContent().

tx_impexp::error msg  ) 
 

Sets error message.

Parameters:
[type] $msg: ...
Returns:
[type] ...

Definition at line 581 of file class.tx_impexp.php.

Referenced by export_addDBRelations(), export_addFilesFromRelations(), export_addRecord(), getNextContentPart(), getNextFilePart(), and getRelations().

tx_impexp::export_addDBRelations relationLevel = 0  ) 
 

This analyses the existing added records, finds all database relations to records and adds these records to the export file. This function can be called recursively until it returns an empty array. In principle it should not allow to infinite recursivity, but you better set a limit... Call this BEFORE the ext_addFilesFromRelations

Parameters:
[type] $relationLevel: ...
Returns:
[type] ...

Definition at line 250 of file class.tx_impexp.php.

References error(), export_addRecord(), and t3lib_BEfunc::getRecord().

tx_impexp::export_addFilesFromRelations  ) 
 

This adds all files in relations. Call this method AFTER adding all records including relations.

Returns:
[type] ...

Definition at line 306 of file class.tx_impexp.php.

References error(), and t3lib_div::formatSize().

tx_impexp::export_addRecord table,
row,
relationLevel = 0
 

Adds the record $row from $table. No checking for relations done here. Pure data.

Parameters:
[type] $table: ...
[type] $row: ...
[type] $relationLevel: ...
Returns:
[type] ...

Definition at line 215 of file class.tx_impexp.php.

References error(), t3lib_div::fixed_lgd_cs(), flatDBrels(), t3lib_div::formatSize(), t3lib_BEfunc::getRecordTitle(), and getRelations().

Referenced by export_addDBRelations().

tx_impexp::flatDBrels dbrels  ) 
 

DB relations flattend to 1-dim array.

Parameters:
[type] $dbrels: ...
Returns:
[type] ...

Definition at line 426 of file class.tx_impexp.php.

References $dat.

Referenced by export_addRecord().

tx_impexp::flatInversePageTree idH,
a = array()
 

Recursively flattening the idH array (for setPageTree() function)

Parameters:
[type] $idH: ...
[type] $a: ...
Returns:
[type] ...

Definition at line 194 of file class.tx_impexp.php.

Referenced by importData(), and setPageTree().

tx_impexp::getNewTCE  ) 
 

[Describe function...]

Returns:
[type] ...

Definition at line 723 of file class.tx_impexp.php.

References t3lib_div::makeInstance().

Referenced by importData(), and setRelations().

tx_impexp::getNextContentPart filecontent,
&$  pointer,
unserialize = 0,
name = ''
 

Returns the next content part from the $filecontent

Parameters:
[type] $filecontent: ...
[type] $pointer: ...
[type] $unserialize: ...
[type] $name: ...
Returns:
[type] ...

Definition at line 465 of file class.tx_impexp.php.

References error().

Referenced by loadContent().

tx_impexp::getNextFilePart fd,
unserialize = 0,
name = ''
 

Returns the next content part form the fileresource, $fd

Parameters:
[type] $fd: ...
[type] $unserialize: ...
[type] $name: ...
Returns:
[type] ...

Definition at line 513 of file class.tx_impexp.php.

References error().

Referenced by loadFile().

tx_impexp::getRelations table,
row
 

Returns relation information for a $table/$row-array

Parameters:
[type] $table: ...
[type] $row: ...
Returns:
[type] ...

Definition at line 353 of file class.tx_impexp.php.

References destPathFromUploadFolder(), error(), t3lib_div::loadTCA(), and t3lib_div::makeInstance().

Referenced by export_addRecord().

tx_impexp::getTempPathFileName fN  ) 
 

Returns the absolute path to typo3temp/ (for writing temporary files from the import ...)

Parameters:
[type] $fN: ...
Returns:
[type] ...

Definition at line 905 of file class.tx_impexp.php.

tx_impexp::import_addFileNameToBeCopied fI  ) 
 

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

Parameters:
[type] $fI: ...
Returns:
[type] ...

Definition at line 881 of file class.tx_impexp.php.

References t3lib_div::writeFile().

tx_impexp::importData pid  ) 
 

Imports the internal data array to $pid.

Parameters:
[type] $pid: ...
Returns:
[type] ...

Definition at line 619 of file class.tx_impexp.php.

References addSingle(), addToMapId(), flatInversePageTree(), getNewTCE(), initImportVars(), setRelations(), and unlinkTempFiles().

tx_impexp::init dontCompress = 0  ) 
 

Init

Parameters:
[type] $dontCompress: ...
Returns:
[type] ...

Definition at line 127 of file class.tx_impexp.php.

References $dontCompress.

tx_impexp::initImportVars  ) 
 

Initializes the import proces variables. This should be done for each time you have a session calling tcemain (remember also to unlink files after these sessions).

Returns:
[type] ...

Definition at line 807 of file class.tx_impexp.php.

Referenced by importData().

tx_impexp::loadContent filecontent  ) 
 

Loads TRD file content into the $this->dat array

Parameters:
[type] $filecontent: ...
Returns:
[type] ...

Definition at line 448 of file class.tx_impexp.php.

References getNextContentPart().

tx_impexp::loadFile filename,
all = 0
 

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

Parameters:
[type] $filename: ...
[type] $all: ...
Returns:
[type] ...

Definition at line 492 of file class.tx_impexp.php.

References getNextFilePart().

tx_impexp::printErrorLog  ) 
 

Returns a table with the error-messages.

Returns:
[type] ...

Definition at line 590 of file class.tx_impexp.php.

References t3lib_div::view_array().

tx_impexp::setMetaData title,
description,
notes,
packager_username,
packager_name,
packager_email
 

Sets meta data

Parameters:
[type] $title: ...
[type] $description: ...
[type] $notes: ...
[type] $packager_username: ...
[type] $packager_name: ...
[type] $packager_email: ...
Returns:
[type] ...

Definition at line 143 of file class.tx_impexp.php.

tx_impexp::setPageTree idH  ) 
 

Sets the page-tree array in the header and returns the array in a flattend version

Parameters:
[type] $idH: ...
Returns:
[type] ...

Definition at line 182 of file class.tx_impexp.php.

References flatInversePageTree().

tx_impexp::setRelations  ) 
 

At the end of the import process all relations should be set properly (that is relations to imported records are all re-created so imported records are correctly related again)

Returns:
[type] ...

Definition at line 737 of file class.tx_impexp.php.

References $dat, and getNewTCE().

Referenced by importData().

tx_impexp::singleRecordLines table,
uid,
&$  lines,
preCode,
checkImportInPidRecord = 0
 

Add entries for a single record

Parameters:
[type] $table: ...
[type] $uid: ...
[type] $lines: ...
[type] $preCode: ...
[type] $checkImportInPidRecord: ...
Returns:
[type] ...

Definition at line 1074 of file class.tx_impexp.php.

References t3lib_div::modifyHTMLColor().

tx_impexp::traverseallrecords pT,
&$  lines
 

Go through ALL records (if the pages are displayed first, those will not be amoung these!)

Parameters:
[type] $pT: ...
[type] $lines: ...
Returns:
[type] ...

Definition at line 1052 of file class.tx_impexp.php.

tx_impexp::traversePageRecords pT,
&$  lines
 

Go through remaining pages (not in tree)

Parameters:
[type] $pT: ...
[type] $lines: ...
Returns:
[type] ...

Definition at line 1025 of file class.tx_impexp.php.

tx_impexp::traversePageTree pT,
&$  lines,
preCode = ''
 

Go through page tree for display

Parameters:
[type] $pT: ...
[type] $lines: ...
[type] $preCode: ...
Returns:
[type] ...

Definition at line 996 of file class.tx_impexp.php.

tx_impexp::unlinkTempFiles  ) 
 

Cleaning up all the temporary files stored in typo3temp/ folder

Returns:
[type] ...

Definition at line 818 of file class.tx_impexp.php.

References t3lib_div::isFirstPartOfStr().

Referenced by importData().


The documentation for this class was generated from the following file:


Généré par Le spécialiste TYPO3 avec  doxygen 1.4.6