182cc48629999cc8ccce336cb1e08e9efe565dc4
[yaffs-website] / web / core / modules / link / src / Plugin / migrate / field / d6 / LinkField.php
1 <?php
2
3 namespace Drupal\link\Plugin\migrate\field\d6;
4
5 use Drupal\migrate\Plugin\MigrationInterface;
6 use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
7
8 /**
9  * @MigrateField(
10  *   id = "link",
11  *   core = {6},
12  *   type_map = {
13  *     "link_field" = "link"
14  *   }
15  * )
16  */
17 class LinkField extends FieldPluginBase {
18
19   /**
20    * {@inheritdoc}
21    */
22   public function getFieldFormatterMap() {
23     // See d6_field_formatter_settings.yml and FieldPluginBase
24     // processFieldFormatter().
25     return [
26       'default' => 'link',
27       'plain' => 'link',
28       'absolute' => 'link',
29       'title_plain' => 'link',
30       'url' => 'link',
31       'short' => 'link',
32       'label' => 'link',
33       'separate' => 'link_separate',
34     ];
35   }
36
37   /**
38    * {@inheritdoc}
39    */
40   public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
41     $process = [
42       'plugin' => 'field_link',
43       'source' => $field_name,
44     ];
45     $migration->mergeProcessOfProperty($field_name, $process);
46   }
47
48 }