You are here

public function ConfigCollector::__construct in Configuration Provider 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/ConfigCollector.php \Drupal\config_provider\Plugin\ConfigCollector::__construct()

Constructor for ConfigCollector objects.

Parameters

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

\Drupal\Core\Config\StorageInterface $active_storage: The active configuration storage.

\Drupal\Core\Config\ConfigManagerInterface $config_manager: The configuration manager.

\Drupal\Core\Config\StorageInterface $provider_storage: The provider configuration storage.

\Drupal\config_provider\Plugin\ConfigProviderManager $config_provider_manager: The configuration provider manager.

string $install_profile: (optional) The current installation profile. This parameter will be mandatory in Drupal 9.0.0.

File

src/Plugin/ConfigCollector.php, line 80

Class

ConfigCollector
Class for invoking configuration providers..

Namespace

Drupal\config_provider\Plugin

Code

public function __construct(ConfigFactoryInterface $config_factory, StorageInterface $active_storage, ConfigManagerInterface $config_manager, StorageInterface $provider_storage, ConfigProviderManager $config_provider_manager, $install_profile = NULL) {
  $this->configFactory = $config_factory;
  $this->activeStorage = $active_storage;
  $this->configManager = $config_manager;
  $this->providerStorage = $provider_storage;
  $this->configProviderManager = $config_provider_manager;
  if (is_null($install_profile)) {
    @trigger_error('Install profile will be a mandatory parameter in Drupal 9.0.', E_USER_DEPRECATED);
  }
  $this->installProfile = $install_profile ?: \Drupal::installProfile();
  $this->configProviders = [];
}