You are here

protected function LateRuntimeProcessor::initialize in Purge 8.3

Initialize the services.

Return value

bool TRUE when everything is available, FALSE when our plugin is disabled.

1 call to LateRuntimeProcessor::initialize()
LateRuntimeProcessor::onKernelFinishRequest in modules/purge_processor_lateruntime/src/EventSubscriber/LateRuntimeProcessor.php
Invoked by the FINISH_REQUEST kernel event.

File

modules/purge_processor_lateruntime/src/EventSubscriber/LateRuntimeProcessor.php, line 55

Class

LateRuntimeProcessor
Processes queue items at the end of every request.

Namespace

Drupal\purge_processor_lateruntime\EventSubscriber

Code

protected function initialize() {
  if (is_null($this->processor)) {

    // If the lateruntime processor plugin doesn't load, this object is not
    // allowed to operate and thus loads the least possible dependencies.
    $this->processor = $this->container
      ->get('purge.processors')
      ->get('lateruntime');
    if ($this->processor !== FALSE) {
      $this->purgePurgers = $this->container
        ->get('purge.purgers');
      $this->purgeQueue = $this->container
        ->get('purge.queue');
    }
  }
  return $this->processor !== FALSE;
}