function EntityComment::import
Same name in other branches
- 9 core/modules/comment/src/Plugin/migrate/destination/EntityComment.php \Drupal\comment\Plugin\migrate\destination\EntityComment::import()
- 8.9.x core/modules/comment/src/Plugin/migrate/destination/EntityComment.php \Drupal\comment\Plugin\migrate\destination\EntityComment::import()
- 11.x core/modules/comment/src/Plugin/migrate/destination/EntityComment.php \Drupal\comment\Plugin\migrate\destination\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\destinationCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.