How do you access a subfield in the prepareRow function?

I have a link field to import from D6, and I want to change the link titles. If I print out the $row object, I can see the link has three entries, field_websites and field_websites:title and field_websites:attributes

  public function prepareRow($row) {
    if (parent::prepareRow($row) === FALSE) {
      return FALSE;
    }
    //this works
    $row->field_websites = 'something else';
    //this does not even run
    $row->field_websites:title = 'something else';
    //this does not map properly
    $row->field_websites_title = 'something else';
  }

Thanks in advance

Comments

rjleigh created an issue. See original summary.

jonathan_hunt’s picture

Status: Active » Needs review