You are here

public function MigrateDrupal6SourceSQL::fields in Drupal-to-Drupal data migration 7.2

Returns a list of fields available to be mapped from the source query.

Return value

array Keys: machine names of the fields (to be passed to addFieldMapping) Values: Human-friendly descriptions of the fields.

Overrides MigrateSourceSQL::fields

File

d6/node.inc, line 224
Implementation of DrupalNodeMigration for Drupal 6 sources.

Class

MigrateDrupal6SourceSQL
We override the default SQL source class just so we can clean up subfield names for the UI.

Code

public function fields() {
  $fields = parent::fields();

  // Remove the default subfield names in favor of the nice-looking ones.
  foreach ($this->fixFieldNames as $clean => $display) {
    if (isset($fields[$clean])) {
      unset($fields[$clean]);
    }
  }
  return $fields;
}