FeaturesServiceProvider.php 608 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Drupal\features;
  3. use Drupal\Core\DependencyInjection\ContainerBuilder;
  4. use Drupal\Core\DependencyInjection\ServiceProviderBase;
  5. /**
  6. * Service provider implementation for Features to override config.installer.
  7. *
  8. * @ingroup container
  9. */
  10. class FeaturesServiceProvider extends ServiceProviderBase {
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public function alter(ContainerBuilder $container) {
  15. // Override the config.installer class with a new class.
  16. $definition = $container->getDefinition('config.installer');
  17. $definition->setClass('Drupal\features\FeaturesConfigInstaller');
  18. }
  19. }