Security update to Drupal 8.4.6
[yaffs-website] / web / core / modules / taxonomy / src / Plugin / migrate / field / TaxonomyTermReference.php
1 <?php
2
3 namespace Drupal\taxonomy\Plugin\migrate\field;
4
5 use Drupal\migrate\Plugin\MigrationInterface;
6 use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
7
8 /**
9  * @MigrateField(
10  *   id = "taxonomy_term_reference",
11  *   type_map = {
12  *     "taxonomy_term_reference" = "entity_reference"
13  *   },
14  *   core = {6,7}
15  * )
16  */
17 class TaxonomyTermReference extends FieldPluginBase {
18
19   /**
20    * {@inheritdoc}
21    */
22   public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
23     $process = [
24       'plugin' => 'sub_process',
25       'source' => $field_name,
26       'process' => [
27         'target_id' => 'tid',
28       ],
29     ];
30     $migration->setProcessOfProperty($field_name, $process);
31   }
32
33 }