You are here

Book.php in Zircon Profile 8

File

core/modules/book/src/Plugin/migrate/destination/Book.php
View source
<?php

/**
 * @file
 * Contains \Drupal\book\Plugin\migrate\destination\Book.
 */
namespace Drupal\book\Plugin\migrate\destination;

use Drupal\Core\Entity\EntityInterface;
use Drupal\migrate\Plugin\migrate\destination\EntityContentBase;
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');
  }

}

Classes

Namesort descending Description
Book Plugin annotation @MigrateDestination( id = "book", provider = "book" )