-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* keep the tstamp from the original records.
* support for records without categories * compatibility TYPO3 9.5: Mostly migrated to query builder * Add new slots to make a check if an imported and converted record shall really be stored.
- Loading branch information
Showing
10 changed files
with
496 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
2021-03-13 Franz Holzinger <[email protected]> | ||
|
||
* keep the tstamp from the original records. | ||
* support for records without categories | ||
* compatibility TYPO3 9.5: Mostly migrated to query builder | ||
|
||
2020-07-29 Franz Holzinger <[email protected]> | ||
|
||
* Add new slots to make a check if an imported and converted record shall really be stored. | ||
|
||
2019-12-12 Franz Holzinger <[email protected]> | ||
|
||
* Add support for the import into image FAL records referencing to the table sys_file_reference | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/*************************************************************** | ||
* Copyright notice | ||
* | ||
* (c) 2019 Franz Holzinger ([email protected]) | ||
* (c) 2020 Franz Holzinger ([email protected]) | ||
* All rights reserved | ||
* | ||
* This script is part of the TYPO3 project. The TYPO3 project is | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?php | ||
namespace JambageCom\Import\Slots; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
|
||
|
||
/** | ||
* Class for example slots to check and modify records before they get stored | ||
*/ | ||
class ExampleRecordSlots implements \TYPO3\CMS\Core\SingletonInterface | ||
{ | ||
/** | ||
* Checks the given row of a table during the import if it shall be stored. | ||
* | ||
* @return mixed[] Array with the parameters of the function call | ||
*/ | ||
public function checkConvertedRecord ( | ||
$tableName, | ||
$row, | ||
$check, | ||
$duplicateCheckNeeded | ||
) | ||
{ | ||
// implement the check here | ||
if ( | ||
$tableName == 'mytablename' && | ||
isset($row['name']) | ||
) { | ||
if ($row['name'] == 'unwanted person') { | ||
$check = false; | ||
$duplicateCheckNeeded = false; | ||
} else { | ||
$duplicateCheckNeeded = true; | ||
} | ||
} | ||
|
||
$result = [ | ||
$tableName, | ||
$row, | ||
$check, | ||
$duplicateCheckNeeded | ||
]; | ||
return $result; | ||
} | ||
|
||
/** | ||
* modifies the given row of a table during the import | ||
* | ||
* @return mixed[] Array with the parameters of the function call | ||
*/ | ||
public function converteRecord ( | ||
$tableName, | ||
$row, | ||
$convertedRow | ||
) | ||
{ | ||
if ( | ||
$tableName == 'mytablename' | ||
) { | ||
$convertedRow = $row; | ||
$convertedRow['imported'] = 1; | ||
} | ||
|
||
$result = [ | ||
$tableName, | ||
$row, | ||
$convertedRow | ||
]; | ||
return $result; | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters