You are here

public static function ProfileDeriver::create in Commerce Migrate 3.1.x

Same name and namespace in other branches
  1. 8.2 modules/commerce/src/Plugin/migrate/ProfileDeriver.php \Drupal\commerce_migrate_commerce\Plugin\migrate\ProfileDeriver::create()
  2. 3.0.x modules/commerce/src/Plugin/migrate/ProfileDeriver.php \Drupal\commerce_migrate_commerce\Plugin\migrate\ProfileDeriver::create()

Creates a new class instance.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the fetcher.

string $base_plugin_id: The base plugin ID for the plugin ID.

Return value

static Returns an instance of this fetcher.

Overrides ContainerDeriverInterface::create

File

modules/commerce/src/Plugin/migrate/ProfileDeriver.php, line 62

Class

ProfileDeriver
Deriver for Commerce 1 profiles.

Namespace

Drupal\commerce_migrate_commerce\Plugin\migrate

Code

public static function create(ContainerInterface $container, $base_plugin_id) {

  // Translations don't make sense unless we have content_translation.
  return new static($base_plugin_id, $container
    ->get('module_handler')
    ->moduleExists('content_translation'), $container
    ->get('migrate_drupal.field_discovery'));
}