Security update to Drupal 8.4.6
[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  * )
18  *
19  * @deprecated in Drupal 8.4.x, to be removed before Drupal 9.0.x. Use
20  * \Drupal\taxonomy\Plugin\migrate\field\TaxonomyTermReference instead.
21  *
22  * @see https://www.drupal.org/node/2751897
23  */
24 class TaxonomyTermReference extends CckFieldPluginBase {
25
26   /**
27    * {@inheritdoc}
28    */
29   public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
30     $process = [
31       'plugin' => 'sub_process',
32       'source' => $field_name,
33       'process' => [
34         'target_id' => 'tid',
35       ],
36     ];
37     $migration->setProcessOfProperty($field_name, $process);
38   }
39
40 }