You are here

public function MigrateSourceEntityReference::getNextRow in Relation 7

Same name and namespace in other branches
  1. 8.2 relation_migrate/relation_migrate.source.inc \MigrateSourceEntityReference::getNextRow()
  2. 8 relation_migrate/relation_migrate.source.inc \MigrateSourceEntityReference::getNextRow()

Fetch the next row of data, returning it as an object. Return FALSE when there is no more data available.

File

relation_migrate/relation_migrate.source.inc, line 143
Source plugin for *reference fields.

Class

MigrateSourceEntityReference
Source migration plugin for entityreference.

Code

public function getNextRow() {
  if (!empty($this->result[$this->next_row])) {
    $item = $this->result[$this->next_row];
    $dest_type = field_info_field($item->field_name);
    $this->next_row++;
    return $this
      ->_constructRow($item, $dest_type['settings']['target_type'], $item->field_name);
  }
  return FALSE;
}