Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function prepareRow(Row $row) { |
||
23 | if ($image_path = $row->getSourceProperty('Hero Image')) { |
||
24 | $path = dirname($this->configuration['path']) . '/images/' . $image_path; |
||
25 | |||
26 | $data = file_get_contents($path); |
||
27 | $uri = file_build_uri($image_path); |
||
28 | $file = file_save_data($data, $uri); |
||
29 | |||
30 | $row->setSourceProperty('Hero Image', $file); |
||
31 | } |
||
32 | if ($value = $row->getSourceProperty('Tags')) { |
||
33 | $row->setSourceProperty('Tags', explode(',', $value)); |
||
34 | } |
||
38 |