You are here

public function UltimateCronServiceProvider::alter in Ultimate Cron 8.2

Modifies existing service definitions.

Parameters

ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.

Overrides ServiceProviderBase::alter

File

src/UltimateCronServiceProvider.php, line 17

Class

UltimateCronServiceProvider
Defines service provider for ultimate cron.

Namespace

Drupal\ultimate_cron

Code

public function alter(ContainerBuilder $container) {

  // Overrides cron class to use our own cron manager.
  $container
    ->getDefinition('cron')
    ->setClass('Drupal\\ultimate_cron\\UltimateCron')
    ->addMethodCall('setConfigFactory', [
    new Reference('config.factory'),
  ]);
}