Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 17 |
LinkField | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 17 |
getFieldFormatterMap | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 11 |
|||
processCckFieldValues | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 6 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\link\Plugin\migrate\cckfield\LinkField. | |
*/ | |
namespace Drupal\link\Plugin\migrate\cckfield; | |
use Drupal\migrate\Entity\MigrationInterface; | |
use Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase; | |
/** | |
* @MigrateCckField( | |
* id = "link" | |
* ) | |
*/ | |
class LinkField extends CckFieldPluginBase { | |
/** | |
* {@inheritdoc} | |
*/ | |
public function getFieldFormatterMap() { | |
// See d6_field_formatter_settings.yml and CckFieldPluginBase | |
// processFieldFormatter(). | |
return [ | |
'default' => 'link', | |
'plain' => 'link', | |
'absolute' => 'link', | |
'title_plain' => 'link', | |
'url' => 'link', | |
'short' => 'link', | |
'label' => 'link', | |
'separate' => 'link_separate', | |
]; | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) { | |
$process = [ | |
'plugin' => 'd6_cck_link', | |
'source' => $field_name, | |
]; | |
$migration->mergeProcessOfProperty($field_name, $process); | |
} | |
} |