You are here

public function DrupalTerm6Migration::prepareRow in Drupal-to-Drupal data migration 7.2

Implementation of Migration::prepareRow().

Parameters

$row:

Overrides DrupalTermMigration::prepareRow

File

d6/taxonomy.inc, line 44
Implementation of DrupalTermMigration for Drupal 6 sources.

Class

DrupalTerm6Migration
Handling specific to a Drupal 6 source for taxonomy terms.

Code

public function prepareRow($row) {
  if (parent::prepareRow($row) === FALSE) {
    return FALSE;
  }

  // Add the (potentially multiple) parents
  $result = Database::getConnection('default', $this->sourceConnection)
    ->select('term_hierarchy', 'th')
    ->fields('th', array(
    'parent',
  ))
    ->condition('tid', $row->tid)
    ->execute();
  foreach ($result as $parent_row) {
    $row->parent[] = $parent_row->parent;
  }
}