NameItem.php in Name Field 8
File
src/Plugin/migrate/cckfield/NameItem.php
View source
<?php
namespace Drupal\name\Plugin\migrate\cckfield;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
class NameItem extends FieldPluginBase {
public function getFieldFormatterMap() {
return [
'name_formatter' => 'name_default',
];
}
public function getFieldWidgetMap() {
return [
'name_widget' => 'name_default',
];
}
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'iterator',
'source' => $field_name,
'process' => [
'title' => 'title',
'given' => 'given',
'middle' => 'middle',
'family' => 'family',
'generational' => 'generational',
'credentials' => 'credentials',
],
];
$migration
->mergeProcessOfProperty($field_name, $process);
}
}