TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Impexp\Controller\ImportExportController Class Reference
Inheritance diagram for TYPO3\CMS\Impexp\Controller\ImportExportController:
TYPO3\CMS\Backend\Module\BaseScriptClass SC_mod_tools_log_index

Public Member Functions

 init ()
 
 main ()
 
 printContent ()
 
 exportData ($inData)
 
 addRecordsForPid ($k, $tables, $maxNumber)
 
 exec_listQueryPid ($table, $pid, $limit)
 
 makeConfigurationForm ($inData, &$row)
 
 makeAdvancedOptionsForm ($inData, &$row)
 
 makeSaveForm ($inData, &$row)
 
 processPresets (&$inData)
 
 getPreset ($uid)
 
 userTempFolder ()
 
 userSaveFolder ()
 
 checkUpload ()
 
 renderSelectBox ($prefix, $value, $optValues)
 
 tableSelector ($prefix, $value, $excludeList='')
 
 extensionSelector ($prefix, $value)
 
 filterPageIds ($exclude)
 
- Public Member Functions inherited from TYPO3\CMS\Backend\Module\BaseScriptClass
 init ()
 
 menuConfig ()
 
 mergeExternalItems ($modName, $menuKey, $menuArr)
 
 handleExternalFunctionValue ($MM_key='function', $MS_value=NULL)
 
 getExternalItemConfig ($modName, $menuKey, $value='')
 
 checkExtObj ()
 
 checkSubExtObj ()
 
 extObjHeader ()
 
 extObjContent ()
 

Public Attributes

 $pageinfo
 
- Public Attributes inherited from TYPO3\CMS\Backend\Module\BaseScriptClass
 $MCONF = array()
 
 $id
 
 $CMD
 
 $perms_clause
 
 $MOD_MENU
 
 $MOD_SETTINGS = array()
 
 $modTSconfig
 
 $modMenu_type = ''
 
 $modMenu_dontValidateList = ''
 
 $modMenu_setDefaultList = ''
 
 $extClassConf
 
 $include_once = array()
 
 $content = ''
 
 $doc
 
 $extObj
 

Protected Member Functions

 getButtons ()
 
 getDefaultImportExportFolder ()
 
 getBackendUser ()
 
 getDatabaseConnection ()
 
 getLanguageService ()
 
 getFile ($combinedIdentifier)
 
 getIndexerService ()
 
- Protected Member Functions inherited from TYPO3\CMS\Backend\Module\BaseScriptClass
 getLanguageService ()
 
 getBackendUser ()
 

Protected Attributes

 $uploadedFiles = array()
 
 $export
 
 $import
 
 $fileProcessor
 
 $vC = ''
 
 $lang = NULL
 
 $treeHTML = ''
 

Detailed Description

Main script class for the Import / Export facility

Author
Kasper Skårhøj kaspe.nosp@m.rYYY.nosp@m.Y@typ.nosp@m.o3.c.nosp@m.om

Definition at line 30 of file ImportExportController.php.

Member Function Documentation

◆ addRecordsForPid()

TYPO3\CMS\Impexp\Controller\ImportExportController::addRecordsForPid (   $k,
  $tables,
  $maxNumber 
)

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

Parameters
integer$kPage id for which to select records to add
array$tablesArray of table names to select from
integer$maxNumberMax amount of records to select
Returns
void
Todo:
Define visibility

Definition at line 449 of file ImportExportController.php.

References $GLOBALS, TYPO3\CMS\Impexp\Controller\ImportExportController\exec_listQueryPid(), TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Impexp\Controller\ImportExportController\getBackendUser(), and TYPO3\CMS\Impexp\Controller\ImportExportController\getDatabaseConnection().

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

◆ checkUpload()

TYPO3\CMS\Impexp\Controller\ImportExportController::checkUpload ( )

Check if a file has been uploaded

Returns
void
Todo:
Define visibility

Definition at line 1295 of file ImportExportController.php.

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

◆ exec_listQueryPid()

TYPO3\CMS\Impexp\Controller\ImportExportController::exec_listQueryPid (   $table,
  $pid,
  $limit 
)

Selects records from table / pid

Parameters
string$tableTable to select from
integer$pidPage ID to select from
integer$limitMax number of records to select
Returns
|object Database resource
Todo:
Define visibility

Definition at line 476 of file ImportExportController.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\deleteClause(), TYPO3\CMS\Impexp\Controller\ImportExportController\getDatabaseConnection(), and TYPO3\CMS\Backend\Utility\BackendUtility\versioningPlaceholderClause().

Referenced by TYPO3\CMS\Impexp\Controller\ImportExportController\addRecordsForPid(), and TYPO3\CMS\Impexp\Controller\ImportExportController\exportData().

◆ exportData()

TYPO3\CMS\Impexp\Controller\ImportExportController::exportData (   $inData)

Export part of module

Parameters
array$inDataContent of POST VAR tx_impexp[]..
Returns
void Setting content in $this->content
Todo:
Define visibility

Definition at line 201 of file ImportExportController.php.

References TYPO3\CMS\Backend\Module\BaseScriptClass\$content, $GLOBALS, TYPO3\CMS\Impexp\Controller\ImportExportController\addRecordsForPid(), die, TYPO3\CMS\Impexp\Controller\ImportExportController\exec_listQueryPid(), TYPO3\CMS\Impexp\Controller\ImportExportController\filterPageIds(), TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Core\Utility\GeneralUtility\formatSize(), TYPO3\CMS\Impexp\Controller\ImportExportController\getBackendUser(), TYPO3\CMS\Impexp\Controller\ImportExportController\getDatabaseConnection(), TYPO3\CMS\Impexp\Controller\ImportExportController\getDefaultImportExportFolder(), TYPO3\CMS\Impexp\Controller\ImportExportController\getFile(), TYPO3\CMS\Impexp\Controller\ImportExportController\getIndexerService(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL(), TYPO3\CMS\Backend\Utility\IconUtility\getSpriteIconForRecord(), TYPO3\CMS\Impexp\Controller\ImportExportController\makeAdvancedOptionsForm(), TYPO3\CMS\Impexp\Controller\ImportExportController\makeConfigurationForm(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), TYPO3\CMS\Impexp\Controller\ImportExportController\makeSaveForm(), TYPO3\CMS\Impexp\Controller\ImportExportController\processPresets(), and TYPO3\CMS\Core\Utility\GeneralUtility\tempnam().

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

◆ extensionSelector()

TYPO3\CMS\Impexp\Controller\ImportExportController::extensionSelector (   $prefix,
  $value 
)

Returns a selector-box with loaded extension keys

Parameters
string$prefixForm element name prefix
array$valueThe current values selected
Returns
string HTML select element
Todo:
Define visibility

Definition at line 1389 of file ImportExportController.php.

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

◆ filterPageIds()

TYPO3\CMS\Impexp\Controller\ImportExportController::filterPageIds (   $exclude)

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

Parameters
array$excludeExclude array from import/export object.
Returns
string AND where clause part to filter out page uids.
Todo:
Define visibility

Definition at line 1415 of file ImportExportController.php.

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

◆ getBackendUser()

◆ getButtons()

TYPO3\CMS\Impexp\Controller\ImportExportController::getButtons ( )
protected

◆ getDatabaseConnection()

◆ getDefaultImportExportFolder()

TYPO3\CMS\Impexp\Controller\ImportExportController::getDefaultImportExportFolder ( )
protected

Returns a object for saving export files to the server and is also used for uploading import files.

Returns
NULL|

Definition at line 1267 of file ImportExportController.php.

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

◆ getFile()

TYPO3\CMS\Impexp\Controller\ImportExportController::getFile (   $combinedIdentifier)
protected

Gets a file by combined identifier.

Parameters
string$combinedIdentifier
Returns
NULL|

Definition at line 1504 of file ImportExportController.php.

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

◆ getIndexerService()

TYPO3\CMS\Impexp\Controller\ImportExportController::getIndexerService ( )
protected

Internal function to retrieve the indexer service, if it does not exist, an instance will be created

Returns

Definition at line 1520 of file ImportExportController.php.

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

◆ getLanguageService()

TYPO3\CMS\Impexp\Controller\ImportExportController::getLanguageService ( )
protected
Returns
LanguageService

Definition at line 1450 of file ImportExportController.php.

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

◆ getPreset()

TYPO3\CMS\Impexp\Controller\ImportExportController::getPreset (   $uid)

Get single preset record

Parameters
integer$uidPreset record
Returns
array Preset record, if any (otherwise FALSE)
Todo:
Define visibility

Definition at line 1229 of file ImportExportController.php.

◆ init()

TYPO3\CMS\Impexp\Controller\ImportExportController::init ( )

◆ main()

◆ makeAdvancedOptionsForm()

TYPO3\CMS\Impexp\Controller\ImportExportController::makeAdvancedOptionsForm (   $inData,
$row 
)

Create advanced options form

Parameters
array$inDataForm configurat data
array$rowTable row accumulation variable. This is filled with table rows.
Returns
void Sets content in $this->content
Todo:
Define visibility

Definition at line 681 of file ImportExportController.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\cshItem(), and TYPO3\CMS\Impexp\Controller\ImportExportController\extensionSelector().

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

◆ makeConfigurationForm()

◆ makeSaveForm()

TYPO3\CMS\Impexp\Controller\ImportExportController::makeSaveForm (   $inData,
$row 
)

Create configuration form

Parameters
array$inDataForm configurat data
array$rowTable row accumulation variable. This is filled with table rows.
Returns
void Sets content in $this->content
Todo:
Define visibility

Definition at line 725 of file ImportExportController.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\cshItem(), TYPO3\CMS\Impexp\Controller\ImportExportController\getBackendUser(), TYPO3\CMS\Impexp\Controller\ImportExportController\getDatabaseConnection(), and TYPO3\CMS\Impexp\Controller\ImportExportController\renderSelectBox().

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

◆ printContent()

TYPO3\CMS\Impexp\Controller\ImportExportController::printContent ( )

Print the content

Returns
void
Todo:
Define visibility

Definition at line 153 of file ImportExportController.php.

References TYPO3\CMS\Backend\Module\BaseScriptClass\$content.

◆ processPresets()

TYPO3\CMS\Impexp\Controller\ImportExportController::processPresets ( $inData)

Manipulate presets

Parameters
array$inDataIn data array, passed by reference!
Returns
void
Todo:
Define visibility

Definition at line 1132 of file ImportExportController.php.

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

◆ renderSelectBox()

TYPO3\CMS\Impexp\Controller\ImportExportController::renderSelectBox (   $prefix,
  $value,
  $optValues 
)

Makes a selector-box from optValues

Parameters
string$prefixForm element name
string$valueCurrent value
array$optValuesOptions to display (key/value pairs)
Returns
string HTML select element
Todo:
Define visibility

Definition at line 1331 of file ImportExportController.php.

Referenced by TYPO3\CMS\Impexp\Controller\ImportExportController\makeConfigurationForm(), and TYPO3\CMS\Impexp\Controller\ImportExportController\makeSaveForm().

◆ tableSelector()

TYPO3\CMS\Impexp\Controller\ImportExportController::tableSelector (   $prefix,
  $value,
  $excludeList = '' 
)

Returns a selector-box with TCA tables

Parameters
string$prefixForm element name prefix
array$valueThe current values selected
string$excludeListTable names (and the string "_ALL") to exclude. Comma list
Returns
string HTML select element
Todo:
Define visibility

Definition at line 1357 of file ImportExportController.php.

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

◆ userSaveFolder()

TYPO3\CMS\Impexp\Controller\ImportExportController::userSaveFolder ( )

Gets the default folder path for temporary uploads, e.g. 'fileadmin/user_uploads/_temp_/importexport/'

Returns
string Absolute path to folder where export files can be saved.
Deprecated:
since TYPO3 CMS 6.2, will be removed two versions later - use getDefaultImportExportFolder() instead

Definition at line 1256 of file ImportExportController.php.

◆ userTempFolder()

TYPO3\CMS\Impexp\Controller\ImportExportController::userTempFolder ( )

Gets the default folder path for temporary uploads, e.g. 'fileadmin/user_uploads/_temp_/importexport/'

Returns
boolean|string Path or FALSE otherwise
Deprecated:
since TYPO3 CMS 6.2, will be removed two versions later - use getDefaultImportExportFolder() instead

Definition at line 1244 of file ImportExportController.php.

Member Data Documentation

◆ $export

TYPO3\CMS\Impexp\Controller\ImportExportController::$export
protected

Definition at line 47 of file ImportExportController.php.

◆ $fileProcessor

TYPO3\CMS\Impexp\Controller\ImportExportController::$fileProcessor
protected

Definition at line 57 of file ImportExportController.php.

◆ $import

TYPO3\CMS\Impexp\Controller\ImportExportController::$import
protected

Definition at line 52 of file ImportExportController.php.

◆ $lang

TYPO3\CMS\Impexp\Controller\ImportExportController::$lang = NULL
protected

Definition at line 67 of file ImportExportController.php.

◆ $pageinfo

TYPO3\CMS\Impexp\Controller\ImportExportController::$pageinfo

Array containing the current page.

Todo:
Define visibility

Definition at line 42 of file ImportExportController.php.

◆ $treeHTML

TYPO3\CMS\Impexp\Controller\ImportExportController::$treeHTML = ''
protected

Definition at line 72 of file ImportExportController.php.

◆ $uploadedFiles

TYPO3\CMS\Impexp\Controller\ImportExportController::$uploadedFiles = array()
protected

Definition at line 35 of file ImportExportController.php.

◆ $vC

TYPO3\CMS\Impexp\Controller\ImportExportController::$vC = ''
protected

Definition at line 62 of file ImportExportController.php.