Same name in this branch
- 10 core/modules/book/src/Plugin/migrate/destination/Book.php \Drupal\book\Plugin\migrate\destination\Book
- 10 core/modules/book/src/Plugin/migrate/source/Book.php \Drupal\book\Plugin\migrate\source\Book
Same name and namespace in other branches
- 8.9.x core/modules/book/src/Plugin/migrate/destination/Book.php \Drupal\book\Plugin\migrate\destination\Book
- 9 core/modules/book/src/Plugin/migrate/destination/Book.php \Drupal\book\Plugin\migrate\destination\Book
Plugin annotation
@MigrateDestination(
id = "book",
provider = "book"
)
Hierarchy
- class \Drupal\migrate\Plugin\migrate\destination\EntityContentBase extends \Drupal\migrate\Plugin\migrate\destination\Entity implements HighestIdInterface, MigrateValidatableEntityInterface
- class \Drupal\book\Plugin\migrate\destination\Book
Expanded class hierarchy of Book
13 string references to 'Book'
- book.info.yml in core/
modules/ book/ book.info.yml - core/modules/book/book.info.yml
- BookController::adminOverview in core/
modules/ book/ src/ Controller/ BookController.php - Returns an administrative overview of all books.
- BookInstallTest::testBookInstallWithPreexistingContentType in core/
modules/ book/ tests/ src/ Kernel/ BookInstallTest.php - Tests Book install with pre-existing content type.
- BookJavascriptTest::testBookOrdering in core/
modules/ book/ tests/ src/ FunctionalJavascript/ BookJavascriptTest.php - Tests re-ordering of books.
- BookManager::addFormElements in core/
modules/ book/ src/ BookManager.php
File
- core/
modules/ book/ src/ Plugin/ migrate/ destination/ Book.php, line 15
Namespace
Drupal\book\Plugin\migrate\destinationView source
class Book extends EntityContentBase {
/**
* {@inheritdoc}
*/
protected static function getEntityTypeId($plugin_id) {
return 'node';
}
/**
* {@inheritdoc}
*/
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);
}
}