Add new comment

Posted on by BTMash (not verified).

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?

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Filtered HTML

  • Use [acphone_sales], [acphone_sales_text], [acphone_support], [acphone_international], [acphone_devcloud], [acphone_extra1] and [acphone_extra2] as placeholders for Acquia phone numbers. Add class "acquia-phones-link" to wrapper element to make number a link.
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <h4> <h5> <h2> <img>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.