public static function ProductVariationFile::create in Commerce Migrate 3.0.x
Same name and namespace in other branches
- 8.2 modules/csv_example/src/Plugin/migrate/process/ProductVariationFile.php \Drupal\commerce_migrate_csv_example\Plugin\migrate\process\ProductVariationFile::create()
- 3.1.x modules/csv_example/src/Plugin/migrate/process/ProductVariationFile.php \Drupal\commerce_migrate_csv_example\Plugin\migrate\process\ProductVariationFile::create()
Creates an instance of the plugin.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the plugin.
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin ID for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
Return value
static Returns an instance of this plugin.
Overrides ContainerFactoryPluginInterface::create
File
- modules/
csv_example/ src/ Plugin/ migrate/ process/ ProductVariationFile.php, line 77
Class
- ProductVariationFile
- Get the fid for the provided filename.
Namespace
Drupal\commerce_migrate_csv_example\Plugin\migrate\processCode
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
// Configure the migration process plugin to look up migrated IDs from
// a d6 file migration.
$migration_plugin_configuration = $configuration + [
'migration' => 'csv_example_image',
'source' => [
'sku',
'image',
],
];
return new static($configuration, $plugin_id, $plugin_definition, $migration, $container
->get('plugin.manager.migrate.process')
->createInstance('migration_lookup', $migration_plugin_configuration, $migration));
}