You are here

protected function QueueWorker::unstashResults in Simple XML sitemap 4.x

Same name and namespace in other branches
  1. 8.3 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 373

Class

QueueWorker

Namespace

Drupal\simple_sitemap\Queue

Code

protected function unstashResults() : void {
  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 = $this->entityTypeManager
      ->getStorage('simple_sitemap')
      ->load($results['variant']);
  }
}