You are here

public function QueueWorker::getQueuedElementCount 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::getQueuedElementCount()

Parameters

bool $force_recount:

Return value

int

4 calls to QueueWorker::getQueuedElementCount()
QueueWorker::generateSitemap in src/Queue/QueueWorker.php
QueueWorker::generationInProgress in src/Queue/QueueWorker.php
QueueWorker::getProcessedElementCount in src/Queue/QueueWorker.php
QueueWorker::queue in src/Queue/QueueWorker.php

File

src/Queue/QueueWorker.php, line 421

Class

QueueWorker

Namespace

Drupal\simple_sitemap\Queue

Code

public function getQueuedElementCount($force_recount = FALSE) {
  if ($force_recount || NULL === $this->elementsRemaining) {
    $this->elementsRemaining = $this->queue
      ->numberOfItems();
  }
  return $this->elementsRemaining;
}