Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 15 |
ImageField | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 15 |
getFieldFormatterMap | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
processCckFieldValues | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 13 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\file\Plugin\migrate\cckfield\d7\ImageField. | |
*/ | |
namespace Drupal\file\Plugin\migrate\cckfield\d7; | |
use Drupal\migrate\Entity\MigrationInterface; | |
use Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase; | |
/** | |
* @MigrateCckField( | |
* id = "image" | |
* ) | |
*/ | |
class ImageField extends CckFieldPluginBase { | |
/** | |
* {@inheritdoc} | |
*/ | |
public function getFieldFormatterMap() { | |
return array(); | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) { | |
$process = [ | |
'plugin' => 'iterator', | |
'source' => $field_name, | |
'process' => [ | |
'target_id' => 'fid', | |
'alt' => 'alt', | |
'title' => 'title', | |
'width' => 'width', | |
'height' => 'height', | |
], | |
]; | |
$migration->mergeProcessOfProperty($field_name, $process); | |
} | |
} |