These are some very cool changes :) I'm trying to wrap my head
around the the whole thing since I got so used to the json way (will
just have to give it a try to fully understand it) which is why I have
a few questions. Just so I understand the changes, the major
implication seems to be that the various pieces (source_dir, alt,
title, destination, etc) are now split up. So if we're now
dealing with a multiple value image field, would we then just be
passing through the mappings and then in our prepareRow be generating
each of these pieces separately? So we'd have something like
(under this assumption, lets say we're passing through a
hardcoded value):
Based off this, would it still know to look inside /mnt/files from
above? Also, so with the example above, it we wanted to preserve the
destination path, I imagine then that just having
<?php
$this->addFieldMapping('field_image:destination_file',
'image_filename'); ?> would be fine?
Fairly significant change!
These are some very cool changes :) I'm trying to wrap my head around the the whole thing since I got so used to the json way (will just have to give it a try to fully understand it) which is why I have a few questions. Just so I understand the changes, the major implication seems to be that the various pieces (source_dir, alt, title, destination, etc) are now split up. So if we're now dealing with a multiple value image field, would we then just be passing through the mappings and then in our prepareRow be generating each of these pieces separately? So we'd have something like (under this assumption, lets say we're passing through a hardcoded value):
<?php
$row->field_image = array('file_1.jpg', 'path/to/file_2.jpg', 'file_3.png');
$row->image_alt = array('Some text', '', 'Text for file 3');
$row->image_title = array('File 1', '', 'File 3');
?>
Based off this, would it still know to look inside /mnt/files from above? Also, so with the example above, it we wanted to preserve the destination path, I imagine then that just having
<?php $this->addFieldMapping('field_image:destination_file', 'image_filename'); ?> would be fine?