@@ -5,49 +5,49 @@ discard block |
||
5 | 5 | use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; |
6 | 6 | use HDNET\Importr\Utility; |
7 | 7 | |
8 | - /** |
|
9 | - * Imports records from a .CSV file into the target table which you |
|
10 | - * can specify on the target section in your strategy. |
|
11 | - * If a record does not exist in the table, it will be inserted, |
|
12 | - * otherwise it will be just updated. No duplicates are created. |
|
13 | - * |
|
14 | - * complete example (strategy target): |
|
15 | - * |
|
16 | - * HDNET\Importr\Service\Targets\InsertUpdateTable: |
|
17 | - * model: TYPO3\CMS\Extbase\Domain\Model\FrontendUser |
|
18 | - * repository: TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository |
|
19 | - * target_table: fe_users |
|
20 | - * exclude_from_update: |
|
21 | - * 0: password |
|
22 | - * 1: first_name |
|
23 | - * 2: zip |
|
24 | - * pid: 324 |
|
25 | - * mapping: |
|
26 | - * 0: username |
|
27 | - * 1: password |
|
28 | - * 2: usergroup |
|
29 | - * 3: name |
|
30 | - * 4: first_name |
|
31 | - * 5: address |
|
32 | - * 6: telephone |
|
33 | - * 7: email |
|
34 | - * 8: zip |
|
35 | - * 9: city |
|
36 | - * 10: company |
|
37 | - * |
|
38 | - * Example CSV: |
|
39 | - * |
|
40 | - * username;password;usergroup;name;first_name;address;telephone;email;zip;city;company |
|
41 | - * EduardFekete;PW123;3;Fekete;Eduard; Example 21; +049123456789;[email protected];91550;Feuchtwangen;MB Connect Line GmbH |
|
42 | - * HansVader;PW1234;3;Vader;Hans; Example 22; +049123456710;[email protected];99900;Universe;Hollywood Studios |
|
43 | - * |
|
44 | - * ------------------------------------------------------------------------------------------------ |
|
45 | - * |
|
46 | - * exclude_from_update: the elements specified in this array, are never being updated |
|
47 | - * |
|
48 | - * ------------------------------------------------------------------------------------------------ |
|
49 | - * @author Eduard Fekete |
|
50 | - */ |
|
8 | + /** |
|
9 | + * Imports records from a .CSV file into the target table which you |
|
10 | + * can specify on the target section in your strategy. |
|
11 | + * If a record does not exist in the table, it will be inserted, |
|
12 | + * otherwise it will be just updated. No duplicates are created. |
|
13 | + * |
|
14 | + * complete example (strategy target): |
|
15 | + * |
|
16 | + * HDNET\Importr\Service\Targets\InsertUpdateTable: |
|
17 | + * model: TYPO3\CMS\Extbase\Domain\Model\FrontendUser |
|
18 | + * repository: TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository |
|
19 | + * target_table: fe_users |
|
20 | + * exclude_from_update: |
|
21 | + * 0: password |
|
22 | + * 1: first_name |
|
23 | + * 2: zip |
|
24 | + * pid: 324 |
|
25 | + * mapping: |
|
26 | + * 0: username |
|
27 | + * 1: password |
|
28 | + * 2: usergroup |
|
29 | + * 3: name |
|
30 | + * 4: first_name |
|
31 | + * 5: address |
|
32 | + * 6: telephone |
|
33 | + * 7: email |
|
34 | + * 8: zip |
|
35 | + * 9: city |
|
36 | + * 10: company |
|
37 | + * |
|
38 | + * Example CSV: |
|
39 | + * |
|
40 | + * username;password;usergroup;name;first_name;address;telephone;email;zip;city;company |
|
41 | + * EduardFekete;PW123;3;Fekete;Eduard; Example 21; +049123456789;[email protected];91550;Feuchtwangen;MB Connect Line GmbH |
|
42 | + * HansVader;PW1234;3;Vader;Hans; Example 22; +049123456710;[email protected];99900;Universe;Hollywood Studios |
|
43 | + * |
|
44 | + * ------------------------------------------------------------------------------------------------ |
|
45 | + * |
|
46 | + * exclude_from_update: the elements specified in this array, are never being updated |
|
47 | + * |
|
48 | + * ------------------------------------------------------------------------------------------------ |
|
49 | + * @author Eduard Fekete |
|
50 | + */ |
|
51 | 51 | |
52 | 52 | class InsertUpdateTable extends AbstractTarget implements TargetInterface |
53 | 53 | { |
@@ -178,14 +178,14 @@ discard block |
||
178 | 178 | $GLOBALS['TYPO3_DB']->sql_insert_id(); |
179 | 179 | } |
180 | 180 | |
181 | - /** |
|
182 | - * Update a record in the target table which you have specified in the |
|
183 | - * target section of the strategy (don't update the password) |
|
184 | - * |
|
185 | - * @param array $entry |
|
186 | - * |
|
187 | - * @return void |
|
188 | - */ |
|
181 | + /** |
|
182 | + * Update a record in the target table which you have specified in the |
|
183 | + * target section of the strategy (don't update the password) |
|
184 | + * |
|
185 | + * @param array $entry |
|
186 | + * |
|
187 | + * @return void |
|
188 | + */ |
|
189 | 189 | public function updateRecord(array $entry) |
190 | 190 | { |
191 | 191 | $into_table = $this->configuration['target_table']; |
@@ -206,14 +206,14 @@ discard block |
||
206 | 206 | } |
207 | 207 | |
208 | 208 | /** |
209 | - * This function creates a duplicate of a associative array and optionally removes |
|
210 | - * any entries which are also elements of a second array |
|
211 | - * |
|
212 | - * @param array $arr |
|
213 | - * @param array $exclude_arr |
|
214 | - * |
|
215 | - * @return array |
|
216 | - */ |
|
209 | + * This function creates a duplicate of a associative array and optionally removes |
|
210 | + * any entries which are also elements of a second array |
|
211 | + * |
|
212 | + * @param array $arr |
|
213 | + * @param array $exclude_arr |
|
214 | + * |
|
215 | + * @return array |
|
216 | + */ |
|
217 | 217 | public function duplicateArray(array $arr, array $exclude_arr = null) |
218 | 218 | { |
219 | 219 | $exclude = false; |