You are here

class ConfigSelectorServiceProvider in Configuration selector 8.2

Same name and namespace in other branches
  1. 8 src/ConfigSelectorServiceProvider.php \Drupal\config_selector\ConfigSelectorServiceProvider

ServiceProvider class for the Configuration Selector.

Hierarchy

Expanded class hierarchy of ConfigSelectorServiceProvider

File

src/ConfigSelectorServiceProvider.php, line 13

Namespace

Drupal\config_selector
View source
class ConfigSelectorServiceProvider implements ServiceProviderInterface {

  /**
   * Registers the config_selector.decorating_config.installer service.
   *
   * This service decorates the config.installer so the optional profile
   * configuration can be selected during installation.
   *
   * @param \Drupal\Core\DependencyInjection\ContainerBuilder $container
   *   The container builder.
   */
  public function register(ContainerBuilder $container) {

    // We only need to do this during an installation.
    if (!InstallerKernel::installationAttempted()) {
      return;
    }
    $container
      ->register('config_selector.decorating_config.installer', DecoratingConfigInstaller::class)
      ->setDecoratedService('config.installer')
      ->addArgument(new Reference('config_selector.decorating_config.installer.inner'))
      ->addArgument(new Reference('config_selector'))
      ->setPublic(FALSE);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigSelectorServiceProvider::register public function Registers the config_selector.decorating_config.installer service. Overrides ServiceProviderInterface::register