You are here

public function EntityCommentType::import in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/comment/src/Plugin/migrate/destination/EntityCommentType.php \Drupal\comment\Plugin\migrate\destination\EntityCommentType::import()

Import the row.

Derived classes must implement import(), to construct one new object (pre-populated) using ID mappings in the Migration.

Parameters

\Drupal\migrate\Row $row: The row object.

array $old_destination_id_values: The old destination ids.

Return value

mixed The entity id or an indication of success.

Overrides EntityConfigBase::import

File

core/modules/comment/src/Plugin/migrate/destination/EntityCommentType.php, line 23
Contains \Drupal\comment\Plugin\migrate\destination\EntityCommentType.

Class

EntityCommentType
Plugin annotation @MigrateDestination( id = "entity:comment_type" )

Namespace

Drupal\comment\Plugin\migrate\destination

Code

public function import(Row $row, array $old_destination_id_values = array()) {
  $entity_ids = parent::import($row, $old_destination_id_values);
  \Drupal::service('comment.manager')
    ->addBodyField(reset($entity_ids));
  return $entity_ids;
}