Profile.php in Commerce Migrate 3.1.x
File
src/Plugin/migrate/destination/Profile.php
View source
<?php
namespace Drupal\commerce_migrate\Plugin\migrate\destination;
use Drupal\migrate\Plugin\migrate\destination\EntityContentBase;
use Drupal\Core\Entity\ContentEntityInterface;
class Profile extends EntityContentBase {
protected static function getEntityTypeId($plugin_id) {
return 'profile';
}
protected function save(ContentEntityInterface $entity, array $old_destination_id_values = []) {
$entity
->save();
return [
$this
->getKey('id') => $entity
->id(),
$this
->getKey('revision') => $entity
->getRevisionId(),
];
}
public function getIds() {
$ids = parent::getIds();
$ids[$this
->getKey('revision')]['type'] = 'integer';
return $ids;
}
}