Issue #2233029 by benjy: Add a Book destination to the Migrate API.

8.0.x
webchick 2014-04-07 11:50:29 -07:00
parent b504423ed0
commit d53d8cf727
1 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
<?php
/**
* @file
* Contains \Drupal\migrate\Plugin\migrate\destination\Book.
*/
namespace Drupal\migrate\Plugin\migrate\destination;
use Drupal\Core\Entity\EntityInterface;
use Drupal\migrate\Row;
/**
* @MigrateDestination(
* id = "book",
* provider = "book"
* )
*/
class Book extends EntityContentBase {
/**
* {@inheritdoc}
*/
protected static function getEntityTypeId($plugin_id) {
return 'node';
}
/**
* {@inheritdoc}
*/
protected function updateEntity(EntityInterface $entity, Row $row) {
$entity->book = $row->getDestinationProperty('book');
}
}