Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EntityComment.php

function EntityComment::import

Overrides EntityContentBase::import

File

core/modules/comment/src/Plugin/migrate/destination/EntityComment.php, line 87

Class

EntityComment
Comment entity destination.

Namespace

Drupal\comment\Plugin\migrate\destination

Code

public function import(Row $row, array $old_destination_id_values = []) {
    if ($row->isStub() && ($state = $this->state
        ->get('comment.maintain_entity_statistics', 0))) {
        $this->state
            ->set('comment.maintain_entity_statistics', 0);
    }
    $return = parent::import($row, $old_destination_id_values);
    if ($row->isStub() && $state) {
        $this->state
            ->set('comment.maintain_entity_statistics', $state);
    }
    return $return;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal