Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / taxonomy / src / Plugin / migrate / cckfield / TaxonomyTermReference.php
1 <?php
2
3 namespace Drupal\taxonomy\Plugin\migrate\cckfield;
4
5 @trigger_error('TaxonomyTermReference is deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.x. Use \Drupal\taxonomy\Plugin\migrate\field\TaxonomyTermReference 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 = "taxonomy_term_reference",
13  *   type_map = {
14  *     "taxonomy_term_reference" = "entity_reference"
15  *   },
16  *   core = {6,7},
17  *   source_module = "taxonomy",
18  *   destination_module = "core",
19  * )
20  *
21  * @deprecated in Drupal 8.4.x, to be removed before Drupal 9.0.x. Use
22  * \Drupal\taxonomy\Plugin\migrate\field\TaxonomyTermReference instead.
23  *
24  * @see https://www.drupal.org/node/2751897
25  */
26 class TaxonomyTermReference extends CckFieldPluginBase {
27
28   /**
29    * {@inheritdoc}
30    */
31   public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
32     $process = [
33       'plugin' => 'sub_process',
34       'source' => $field_name,
35       'process' => [
36         'target_id' => 'tid',
37       ],
38     ];
39     $migration->setProcessOfProperty($field_name, $process);
40   }
41
42 }