You are here

protected function QueueWorker::unstashResults in Simple XML sitemap 8.3

Same name and namespace in other branches
  1. 4.x src/Queue/QueueWorker.php \Drupal\simple_sitemap\Queue\QueueWorker::unstashResults()
1 call to QueueWorker::unstashResults()
QueueWorker::generateSitemap in src/Queue/QueueWorker.php

File

src/Queue/QueueWorker.php, line 398

Class

QueueWorker

Namespace

Drupal\simple_sitemap\Queue

Code

protected function unstashResults() {
  if (NULL !== ($results = $this->state
    ->get('simple_sitemap.queue_stashed_results'))) {
    $this->state
      ->delete('simple_sitemap.queue_stashed_results');
    $this->results = !empty($results['results']) ? $results['results'] : [];
    $this->processedResults = !empty($results['processed_results']) ? $results['processed_results'] : [];
    $this->processedPaths = !empty($results['processed_paths']) ? $results['processed_paths'] : [];
    $this->variantProcessedNow = $results['variant'];
    $this->generatorProcessedNow = $results['generator'];
  }
}