You are here

public function MediaMigrationSubscriber::onPrepareRow in Media Migration 8

Migrate prepare row event handler.

Parameters

\Drupal\migrate_plus\Event\MigratePrepareRowEvent $event: The prepare row event.

Throws

\Exception If the row is empty.

File

src/EventSubscriber/MediaMigrationSubscriber.php, line 42

Class

MediaMigrationSubscriber
Media migration event subscriber.

Namespace

Drupal\media_migration\EventSubscriber

Code

public function onPrepareRow(MigratePrepareRowEvent $event) {
  $this
    ->fileEntityFieldToMedia($event);
  $this
    ->imageFieldToMedia($event);
}