modules/custom/deims_d6_migration/migration/DeimsContentResearchProjectMigration.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

/**
 * @file
 * Definition of DeimsContentResearchProjectMigration.
 */

class DeimsContentResearchProjectMigration extends DrupalNode6Migration {
  protected $dependencies = array();

  public function __construct(array $arguments) {
    $arguments += array(
      'description' => '',
      'source_connection' => 'drupal6',
      'source_version' => 6,
      'source_type' => 'research_project',
      'destination_type' => 'project',
      'user_migration' => 'DeimsUser',
    );

    parent::__construct($arguments);

    $this->addFieldMapping('field_abstract', 'field_project_description');
  }

  public function prepareRow($row) {
    parent::prepareRow($row);
  }

  public function prepare($node, $row) {
    // Remove any empty or illegal delta field values.
    EntityHelper::removeInvalidFieldDeltas('node', $node);
    EntityHelper::removeEmptyFieldValues('node', $node);
  }
}