function EntityNodeType::import
Same name in other branches
- 9 core/modules/node/src/Plugin/migrate/destination/EntityNodeType.php \Drupal\node\Plugin\migrate\destination\EntityNodeType::import()
- 8.9.x core/modules/node/src/Plugin/migrate/destination/EntityNodeType.php \Drupal\node\Plugin\migrate\destination\EntityNodeType::import()
- 10 core/modules/node/src/Plugin/migrate/destination/EntityNodeType.php \Drupal\node\Plugin\migrate\destination\EntityNodeType::import()
Overrides EntityConfigBase::import
File
-
core/
modules/ node/ src/ Plugin/ migrate/ destination/ EntityNodeType.php, line 35
Class
- EntityNodeType
- Migration destination for node type entity.
Namespace
Drupal\node\Plugin\migrate\destinationCode
public function import(Row $row, array $old_destination_id_values = []) {
$entity_ids = parent::import($row, $old_destination_id_values);
if ($row->getDestinationProperty('create_body')) {
$node_type = $this->storage
->load(reset($entity_ids));
node_add_body_field($node_type, $row->getDestinationProperty('create_body_label'));
}
return $entity_ids;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.