Update to Drupal 8.0.0-rc3. For more information, see https://www.drupal.org/node/2608078

This commit is contained in:
Pantheon Automation 2015-11-04 11:11:27 -08:00 committed by Greg Anderson
parent 6419a031d7
commit 4afb23bbd3
762 changed files with 20080 additions and 6368 deletions

View file

@ -9,6 +9,7 @@ namespace Drupal\migrate_drupal\Plugin;
use Drupal\Component\Plugin\PluginInspectionInterface;
use Drupal\migrate\Entity\MigrationInterface;
use Drupal\migrate\Row;
/**
* Provides an interface for all CCK field type plugins.
@ -77,4 +78,15 @@ interface MigrateCckFieldInterface extends PluginInspectionInterface {
*/
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data);
/**
* Computes the destination type of a migrated field.
*
* @param \Drupal\migrate\Row $row
* The field being migrated.
*
* @return string
* The destination field type.
*/
public function getFieldType(Row $row);
}

View file

@ -9,6 +9,7 @@ namespace Drupal\migrate_drupal\Plugin\migrate\cckfield;
use Drupal\Core\Plugin\PluginBase;
use Drupal\migrate\Entity\MigrationInterface;
use Drupal\migrate\Row;
use Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface;
/**
@ -70,4 +71,18 @@ abstract class CckFieldPluginBase extends PluginBase implements MigrateCckFieldI
$migration->mergeProcessOfProperty('options/type', $process);
}
/**
* {@inheritdoc}
*/
public function getFieldType(Row $row) {
$field_type = $row->getSourceProperty('type');
if (isset($this->pluginDefinition['type_map'][$field_type])) {
return $this->pluginDefinition['type_map'][$field_type];
}
else {
return $field_type;
}
}
}