function Config::__construct

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()
Same name in other branches
  1. 9 composer/Plugin/VendorHardening/Config.php \Drupal\Composer\Plugin\VendorHardening\Config::__construct()
  2. 9 core/modules/migrate/src/Plugin/migrate/destination/Config.php \Drupal\migrate\Plugin\migrate\destination\Config::__construct()
  3. 9 core/lib/Drupal/Core/Config/Config.php \Drupal\Core\Config\Config::__construct()
  4. 8.9.x composer/Plugin/VendorHardening/Config.php \Drupal\Composer\Plugin\VendorHardening\Config::__construct()
  5. 8.9.x core/modules/migrate/src/Plugin/migrate/destination/Config.php \Drupal\migrate\Plugin\migrate\destination\Config::__construct()
  6. 8.9.x core/lib/Drupal/Core/Config/Config.php \Drupal\Core\Config\Config::__construct()
  7. 11.x composer/Plugin/VendorHardening/Config.php \Drupal\Composer\Plugin\VendorHardening\Config::__construct()
  8. 11.x core/modules/migrate/src/Plugin/migrate/destination/Config.php \Drupal\migrate\Plugin\migrate\destination\Config::__construct()
  9. 11.x core/lib/Drupal/Core/Config/Config.php \Drupal\Core\Config\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.

\Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager: The typed config manager.

Overrides DestinationBase::__construct

File

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

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, ?TypedConfigManagerInterface $typed_config_manager = NULL) {
    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;
    }
    if ($typed_config_manager === NULL) {
        @trigger_error('Calling ' . __METHOD__ . '() without the $typed_config_manager argument is deprecated in drupal:10.3.0 and is removed in drupal:11.0.0. See https://www.drupal.org/node/3440502', E_USER_DEPRECATED);
        $typed_config_manager = \Drupal::service(TypedConfigManagerInterface::class);
    }
    $this->typedConfigManager = $typed_config_manager;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.