You are here

public function Config::__construct in Drupal 10

Same name in this branch
  1. 10 composer/Plugin/VendorHardening/Config.php \Drupal\Composer\Plugin\VendorHardening\Config::__construct()
  2. 10 core/lib/Drupal/Core/Config/Config.php \Drupal\Core\Config\Config::__construct()
  3. 10 core/modules/migrate/src/Plugin/migrate/destination/Config.php \Drupal\migrate\Plugin\migrate\destination\Config::__construct()
Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/migrate/destination/Config.php \Drupal\migrate\Plugin\migrate\destination\Config::__construct()
  2. 9 core/modules/migrate/src/Plugin/migrate/destination/Config.php \Drupal\migrate\Plugin\migrate\destination\Config::__construct()

Constructs a Config destination object.

Parameters

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.

\Drupal\migrate\Plugin\MigrationInterface $migration: The migration entity.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

Overrides DestinationBase::__construct

File

core/modules/migrate/src/Plugin/migrate/destination/Config.php, line 106

Class

Config
Provides Configuration Management destination plugin.

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, ConfigFactoryInterface $config_factory, LanguageManagerInterface $language_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
  $this->config = $config_factory
    ->getEditable($configuration['config_name']);
  $this->language_manager = $language_manager;
  if ($this
    ->isTranslationDestination()) {
    $this->supportsRollback = TRUE;
  }
}