8acf70a998301e699fa9b6e83983d8e89d31840d
[yaffs-website] / web / core / modules / link / src / Plugin / migrate / cckfield / LinkField.php
1 <?php
2
3 namespace Drupal\link\Plugin\migrate\cckfield;
4
5 @trigger_error('LinkField is deprecated in Drupal 8.3.x and will be be removed before Drupal 9.0.x. Use \Drupal\link\Plugin\migrate\field\d6\LinkField instead.', E_USER_DEPRECATED);
6
7 use Drupal\migrate\Plugin\MigrationInterface;
8 use Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase;
9
10 /**
11  * @MigrateCckField(
12  *   id = "link",
13  *   core = {6},
14  *   type_map = {
15  *     "link_field" = "link"
16  *   }
17  * )
18  *
19  * @deprecated in Drupal 8.3.x and will be removed in Drupal 9.0.x. Use
20  * \Drupal\link\Plugin\migrate\field\d6\LinkField instead.
21  *
22  * @see https://www.drupal.org/node/2751897
23  */
24 class LinkField extends CckFieldPluginBase {
25
26   /**
27    * {@inheritdoc}
28    */
29   public function getFieldFormatterMap() {
30     // See d6_field_formatter_settings.yml and CckFieldPluginBase
31     // processFieldFormatter().
32     return [
33       'default' => 'link',
34       'plain' => 'link',
35       'absolute' => 'link',
36       'title_plain' => 'link',
37       'url' => 'link',
38       'short' => 'link',
39       'label' => 'link',
40       'separate' => 'link_separate',
41     ];
42   }
43
44   /**
45    * {@inheritdoc}
46    */
47   public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
48     $process = [
49       'plugin' => 'd6_cck_link',
50       'source' => $field_name,
51     ];
52     $migration->mergeProcessOfProperty($field_name, $process);
53   }
54
55 }