35 public function importT3DFile($file, $pid) {
36 if (!is_string($file)) {
37 throw new \InvalidArgumentException(
'Input parameter $file has to be of type string', 1377625645);
40 throw new \InvalidArgumentException(
'Input parameter $int has to be of type integer', 1377625646);
44 $import->init(0,
'import');
49 if ($file && @is_file($file)) {
50 if ($import->loadFile($file, 1)) {
52 $import->importData($pid);
54 $newPages = $import->import_mapId[
'pages'];
55 $importResponse = (int)reset($newPages);
60 $errors = $import->printErrorLog();
64 $logger->warning($errors);
66 if (!$importResponse) {
67 throw new \ErrorException(
'No page records imported', 1377625537);
70 return $importResponse;
emitAfterImportExportInitialisationSignal(\TYPO3\CMS\Impexp\ImportExport $import)
static makeInstance($className)
getSignalSlotDispatcher()