|
@@ -12,14 +12,14 @@ discard block |
|
|
block discarded – undo |
|
12
|
12
|
use Oliverde8\Component\PhpEtl\Loader\File\Csv; |
|
13
|
13
|
use Oliverde8\Component\PhpEtl\Model\File\Csv\Writer; |
|
14
|
14
|
|
|
15
|
|
-$inputIterator = new Csv(__DIR__ . '/exemples/I-Service.csv'); |
|
|
15
|
+$inputIterator = new Csv(__DIR__ . '/exemples/I-Service.csv'); |
|
16
|
16
|
|
|
17
|
17
|
$localizableAttributes = ['name_src', 'editor_name_src', 'valid_from', 'valid_to']; |
|
18
|
18
|
|
|
19
|
19
|
$operations = []; |
|
20
|
20
|
|
|
21
|
21
|
// Cleanup the data to use akeneo attribute codes. |
|
22
|
|
-$operations[] = new CallbackTransformerOperation(function (DataItemInterface $item, &$context) { |
|
|
22
|
+$operations[] = new CallbackTransformerOperation(function(DataItemInterface $item, &$context) { |
|
23
|
23
|
$data = $item->getData(); |
|
24
|
24
|
$newData = []; |
|
25
|
25
|
$newData['sku'] = implode( |
|
@@ -51,7 +51,7 @@ discard block |
|
|
block discarded – undo |
|
51
|
51
|
|
|
52
|
52
|
// Finalize transformation by having proper attribute codes taking locales into account. |
|
53
|
53
|
$operations[] = new CallbackTransformerOperation( |
|
54
|
|
- function (DataItemInterface $item, &$context) use ($localizableAttributes) { |
|
|
54
|
+ function(DataItemInterface $item, &$context) use ($localizableAttributes) { |
|
55
|
55
|
|
|
56
|
56
|
$data = []; |
|
57
|
57
|
foreach ($item->getData() as $productDetails) { |
Please login to merge, or discard this patch.