public function DrupalTerm7Migration::prepareRow in Drupal-to-Drupal data migration 7.2
Review a data row after fetch, returning FALSE to skip it.
Parameters
$row:
Return value
bool
Overrides DrupalTermMigration::prepareRow
File
- d7/
taxonomy.inc, line 35 - Implementation of DrupalTermMigration for Drupal 7 sources.
Class
- DrupalTerm7Migration
- @file Implementation of DrupalTermMigration for Drupal 7 sources.
Code
public function prepareRow($row) {
if (parent::prepareRow($row) === FALSE) {
return FALSE;
}
// Add the (potentially multiple) parents.
$result = Database::getConnection('default', $this->sourceConnection)
->select('taxonomy_term_hierarchy', 'th')
->fields('th', array(
'parent',
))
->condition('tid', $row->tid)
->execute();
$row->parent = array();
foreach ($result as $parent_row) {
$row->parent[] = $parent_row->parent;
}
$this->version
->getSourceValues($row, $row->tid);
return TRUE;
}