Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / migrate_MIGRATION_ID_prepare_row.twig
1 /**
2  * Implements hook_migrate_MIGRATION_ID_prepare_row().
3  */
4 function {{ machine_name }}_migrate_MIGRATION_ID_prepare_row(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) {
5   $value = $source->getDatabase()->query('SELECT value FROM {variable} WHERE name = :name', [':name' => 'mymodule_filter_foo_' . $row->getSourceProperty('format')])->fetchField();
6   if ($value) {
7     $row->setSourceProperty('settings:mymodule:foo', unserialize($value));
8   }
9 }