Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / comment / src / Plugin / migrate / destination / EntityCommentType.php
1 <?php
2
3 namespace Drupal\comment\Plugin\migrate\destination;
4
5 use Drupal\migrate\Plugin\migrate\destination\EntityConfigBase;
6 use Drupal\migrate\Row;
7
8 /**
9  * @MigrateDestination(
10  *   id = "entity:comment_type"
11  * )
12  */
13 class EntityCommentType extends EntityConfigBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   public function import(Row $row, array $old_destination_id_values = []) {
19     $entity_ids = parent::import($row, $old_destination_id_values);
20     \Drupal::service('comment.manager')->addBodyField(reset($entity_ids));
21     return $entity_ids;
22   }
23
24 }