You are here

public function DrupalComment6Migration::__construct in Drupal-to-Drupal data migration 7.2

Parameters

array $arguments:

Overrides DrupalCommentMigration::__construct

File

d6/comment.inc, line 15
Implementation of DrupalCommentMigration for Drupal 6 sources.

Class

DrupalComment6Migration
Handling specific to a Drupal 6 source for comments.

Code

public function __construct(array $arguments) {
  parent::__construct($arguments);
  if (!$this->newOnly) {
    $this->highwaterField = array(
      'name' => 'timestamp',
      'alias' => 'c',
      'type' => 'int',
    );
  }

  // Version-specific field mappings
  $this
    ->addFieldMapping('comment_body', 'comment');
  $this
    ->addFieldMapping('comment_body:format', 'format')
    ->callbacks(array(
    $this,
    'mapFormat',
  ));
  $this
    ->addFieldMapping('created', 'timestamp');
  $this
    ->addFieldMapping('changed', 'timestamp');
  $this
    ->addFieldMapping('status', 'status')
    ->callbacks(array(
    $this,
    'handleStatus',
  ));
  $this
    ->addUnmigratedDestinations(array(
    'language',
    'comment_body:language',
  ));
}