Drupal 8  8.0.2
AutomatedCron Class Reference
Inheritance diagram for AutomatedCron:

Public Member Functions

 __construct (CronInterface $cron, ConfigFactoryInterface $config_factory, StateInterface $state)
 
 onTerminate (PostResponseEvent $event)
 

Static Public Member Functions

static getSubscribedEvents ()
 

Protected Attributes

 $cron
 
 $config
 
 $state
 

Detailed Description

A subscriber running cron after a response is sent.

Constructor & Destructor Documentation

__construct ( CronInterface  $cron,
ConfigFactoryInterface  $config_factory,
StateInterface  $state 
)

Constructs a new automated cron runner.

Parameters
\Drupal\Core\CronInterface$cronThe cron service.
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe config factory.
\Drupal\Core\State\StateInterface$stateThe state key-value store service.

References Drupal\config(), ConfigFactoryInterface\get(), and Drupal\state().

Here is the call graph for this function:

Member Function Documentation

static getSubscribedEvents ( )
static

Registers the methods in this class that should be listeners.

Returns
array An array of event listener definitions.
onTerminate ( PostResponseEvent  $event)

Run the automated cron if enabled.

Parameters
\Symfony\Component\HttpKernel\Event\PostResponseEvent$eventThe Event to process.

References Drupal\config(), and Drupal\state().

Here is the call graph for this function:


The documentation for this class was generated from the following file: