You are here

class UpdateServiceProvider in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Update/UpdateServiceProvider.php \Drupal\Core\Update\UpdateServiceProvider

Ensures for some services that they don't cache.

Hierarchy

Expanded class hierarchy of UpdateServiceProvider

File

core/lib/Drupal/Core/Update/UpdateServiceProvider.php, line 19
Contains \Drupal\Core\Update\UpdateServiceProvider.

Namespace

Drupal\Core\Update
View source
class UpdateServiceProvider implements ServiceProviderInterface, ServiceModifierInterface {

  /**
   * {@inheritdoc}
   */
  public function register(ContainerBuilder $container) {
    $definition = new Definition('Drupal\\Core\\Cache\\NullBackend', [
      'null',
    ]);
    $container
      ->setDefinition('cache.null', $definition);
  }

  /**
   * {@inheritdoc}
   */
  public function alter(ContainerBuilder $container) {
    $definition = $container
      ->getDefinition('asset.resolver');
    $argument = new Reference('cache.null');
    $definition
      ->replaceArgument(5, $argument);
    $definition = $container
      ->getDefinition('library.discovery.collector');
    $argument = new Reference('cache.null');
    $definition
      ->replaceArgument(0, $argument);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UpdateServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceModifierInterface::alter
UpdateServiceProvider::register public function Registers services to the container. Overrides ServiceProviderInterface::register