You are here

class UltimateCronServiceProvider in Ultimate Cron 8.2

Defines service provider for ultimate cron.

Hierarchy

Expanded class hierarchy of UltimateCronServiceProvider

File

src/UltimateCronServiceProvider.php, line 12

Namespace

Drupal\ultimate_cron
View source
class UltimateCronServiceProvider extends ServiceProviderBase {

  /**
   * {@inheritdoc}
   */
  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'),
    ]);
  }

}

Members

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