You are here

class ConfigProviderConfigInstaller in Configuration Provider 8.2

Same name in this branch
  1. 8.2 src/ConfigProviderConfigInstaller.php \Drupal\config_provider\ConfigProviderConfigInstaller
  2. 8.2 src/ProxyClass/ConfigProviderConfigInstaller.php \Drupal\config_provider\ProxyClass\ConfigProviderConfigInstaller
Same name and namespace in other branches
  1. 8 src/ConfigProviderConfigInstaller.php \Drupal\config_provider\ConfigProviderConfigInstaller

Hierarchy

Expanded class hierarchy of ConfigProviderConfigInstaller

File

src/ConfigProviderConfigInstaller.php, line 9

Namespace

Drupal\config_provider
View source
class ConfigProviderConfigInstaller extends ConfigInstaller implements ConfigInstallerInterface {

  /**
   * Overrides \Drupal\Core\Config\ConfigInstaller::getConfigToCreate().
   *
   * When extensions are installed, consult all registered config providers.
   *
   * @param StorageInterface $storage
   *   The configuration storage to read configuration from.
   * @param string $collection
   *  The configuration collection to use.
   * @param string $prefix
   *   (optional) Limit to configuration starting with the provided string.
   * @param \Drupal\Core\Config\StorageInterface[] $profile_storages
   *   An array of storage interfaces containing profile configuration to check
   *   for overrides.
   *
   * @return array
   *   An array of configuration data read from the source storage keyed by the
   *   configuration object name.
   */
  protected function getConfigToCreate(StorageInterface $storage, $collection, $prefix = '', array $profile_storages = []) {

    // Determine if we have configuration to create.
    $config_to_create = parent::getConfigToCreate($storage, $collection, $prefix, $profile_storages);

    /* @var \Drupal\config_provider\Plugin\ConfigCollectorInterface $config_collector */
    $config_collector = \Drupal::service('config_provider.collector');
    foreach ($config_collector
      ->getConfigProviders() as $config_provider) {
      $config_provider
        ->addConfigToCreate($config_to_create, $storage, $collection, $prefix, $profile_storages);
    }
    return $config_to_create;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigInstaller::$activeStorages protected property The active configuration storages, keyed by collection.
ConfigInstaller::$configFactory protected property The configuration factory.
ConfigInstaller::$configManager protected property The configuration manager.
ConfigInstaller::$eventDispatcher protected property The event dispatcher.
ConfigInstaller::$installProfile protected property The name of the currently active installation profile.
ConfigInstaller::$isSyncing protected property Is configuration being created as part of a configuration sync.
ConfigInstaller::$sourceStorage protected property The configuration storage that provides the default configuration.
ConfigInstaller::$typedConfig protected property The typed configuration manager.
ConfigInstaller::checkConfigurationToInstall public function Checks the configuration that will be installed for an extension. Overrides ConfigInstallerInterface::checkConfigurationToInstall
ConfigInstaller::createConfiguration protected function Creates configuration in a collection based on the provided list.
ConfigInstaller::drupalGetPath protected function Wrapper for drupal_get_path().
ConfigInstaller::drupalGetProfile protected function Gets the install profile from settings.
ConfigInstaller::drupalInstallationAttempted Deprecated protected function Wrapper for drupal_installation_attempted().
ConfigInstaller::findDefaultConfigWithUnmetDependencies protected function Finds default configuration with unmet dependencies.
ConfigInstaller::findPreExistingConfiguration protected function Finds pre-existing configuration objects for the provided extension.
ConfigInstaller::getActiveStorages protected function Gets the configuration storage that provides the active configuration.
ConfigInstaller::getDefaultConfigDirectory protected function Gets an extension's default configuration directory.
ConfigInstaller::getEnabledExtensions protected function Gets the list of enabled extensions including both modules and themes.
ConfigInstaller::getMissingDependencies protected function Returns an array of missing dependencies for a config object.
ConfigInstaller::getProfileStorages protected function Gets the profile storage to use to check for profile overrides.
ConfigInstaller::getSourceStorage public function Gets the configuration storage that provides the default configuration. Overrides ConfigInstallerInterface::getSourceStorage
ConfigInstaller::installCollectionDefaultConfig public function Installs all default configuration in the specified collection. Overrides ConfigInstallerInterface::installCollectionDefaultConfig
ConfigInstaller::installDefaultConfig public function Installs the default configuration of a given extension. Overrides ConfigInstallerInterface::installDefaultConfig
ConfigInstaller::installOptionalConfig public function Installs optional configuration. Overrides ConfigInstallerInterface::installOptionalConfig
ConfigInstaller::isSyncing public function Gets the syncing state. Overrides ConfigInstallerInterface::isSyncing
ConfigInstaller::setSourceStorage public function Sets the configuration storage that provides the default configuration. Overrides ConfigInstallerInterface::setSourceStorage
ConfigInstaller::setSyncing public function Sets the status of the isSyncing flag. Overrides ConfigInstallerInterface::setSyncing
ConfigInstaller::validateDependencies protected function Validates an array of config data that contains dependency information.
ConfigInstaller::__construct public function Constructs the configuration installer.
ConfigProviderConfigInstaller::getConfigToCreate protected function Overrides \Drupal\Core\Config\ConfigInstaller::getConfigToCreate(). Overrides ConfigInstaller::getConfigToCreate