function ConfigImportForm::__construct

Same name and namespace in other branches
  1. 9 core/modules/config/src/Form/ConfigImportForm.php \Drupal\config\Form\ConfigImportForm::__construct()
  2. 10 core/modules/config/src/Form/ConfigImportForm.php \Drupal\config\Form\ConfigImportForm::__construct()
  3. 11.x core/modules/config/src/Form/ConfigImportForm.php \Drupal\config\Form\ConfigImportForm::__construct()

Constructs a new ConfigImportForm.

Parameters

\Drupal\Core\Config\StorageInterface $config_storage: The configuration storage.

\Drupal\Core\File\FileSystemInterface $file_system: The file system service.

\Drupal\Core\Site\Settings $settings: The settings object.

File

core/modules/config/src/Form/ConfigImportForm.php, line 51

Class

ConfigImportForm
Defines the configuration import form.

Namespace

Drupal\config\Form

Code

public function __construct(StorageInterface $config_storage, FileSystemInterface $file_system = NULL, Settings $settings = NULL) {
    $this->configStorage = $config_storage;
    if (!isset($file_system)) {
        @trigger_error('The $file_system parameter was added in Drupal 8.8.0 and will be required in 9.0.0. See https://www.drupal.org/node/3021434.', E_USER_DEPRECATED);
        $file_system = \Drupal::service('file_system');
    }
    $this->fileSystem = $file_system;
    if (!isset($settings)) {
        @trigger_error('The $settings parameter was added in Drupal 8.8.0 and will be required in 9.0.0. See https://www.drupal.org/node/2980712.', E_USER_DEPRECATED);
        $settings = \Drupal::service('settings');
    }
    $this->settings = $settings;
}

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