function Book::updateEntity
Same name in other branches
- 9 core/modules/book/src/Plugin/migrate/destination/Book.php \Drupal\book\Plugin\migrate\destination\Book::updateEntity()
- 8.9.x core/modules/book/src/Plugin/migrate/destination/Book.php \Drupal\book\Plugin\migrate\destination\Book::updateEntity()
- 10 core/modules/book/src/Plugin/migrate/destination/Book.php \Drupal\book\Plugin\migrate\destination\Book::updateEntity()
Overrides EntityContentBase::updateEntity
File
-
core/
modules/ book/ src/ Plugin/ migrate/ destination/ Book.php, line 27
Class
- Book
- Plugin annotation @MigrateDestination( id = "book", provider = "book" )
Namespace
Drupal\book\Plugin\migrate\destinationCode
protected function updateEntity(EntityInterface $entity, Row $row) {
if ($entity->book) {
$book = $row->getDestinationProperty('book');
foreach ($book as $key => $value) {
$entity->book[$key] = $value;
}
}
else {
$entity->book = $row->getDestinationProperty('book');
}
return parent::updateEntity($entity, $row);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.