ImageField.php in Drupal 10
File
core/modules/image/src/Plugin/migrate/field/d7/ImageField.php
View source
<?php
namespace Drupal\image\Plugin\migrate\field\d7;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
class ImageField extends FieldPluginBase {
public function getFieldWidgetMap() {
return [
'image' => 'image_default',
'image_miw' => 'image_image',
];
}
public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'target_id' => 'fid',
'alt' => 'alt',
'title' => 'title',
'width' => 'width',
'height' => 'height',
],
];
$migration
->mergeProcessOfProperty($field_name, $process);
}
}
Classes
Name |
Description |
ImageField |
Plugin annotation
@MigrateField(
id = "image",
core = {7},
source_module = "image",
destination_module = "image"
) |