FieldInstanceSettings.php in Zircon Profile 8.0
File
core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceSettings.php
View source
<?php
namespace Drupal\field\Plugin\migrate\process\d7;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
class FieldInstanceSettings extends ProcessPluginBase {
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
list($instance_settings, $widget_settings) = $value;
$widget_type = $widget_settings['type'];
switch ($widget_type) {
case 'image_image':
$settings = $instance_settings;
$settings['default_image'] = array(
'alt' => '',
'title' => '',
'width' => NULL,
'height' => NULL,
'uuid' => '',
);
break;
default:
$settings = $instance_settings;
}
return $settings;
}
}