You are here

public function SimpleSitemapViews::getArgumentsFromIndexCount in Simple XML sitemap 4.x

Same name and namespace in other branches
  1. 8.3 modules/simple_sitemap_views/src/SimpleSitemapViews.php \Drupal\simple_sitemap_views\SimpleSitemapViews::getArgumentsFromIndexCount()

Get the number of rows in the index.

Parameters

\Drupal\Core\Database\Query\ConditionInterface|null $condition: The query conditions.

Return value

int The number of rows.

1 call to SimpleSitemapViews::getArgumentsFromIndexCount()
SimpleSitemapViews::addArgumentsToIndexByVariant in modules/simple_sitemap_views/src/SimpleSitemapViews.php
Adds view arguments to the index by the sitemap variant.

File

modules/simple_sitemap_views/src/SimpleSitemapViews.php, line 389

Class

SimpleSitemapViews
Class to manage sitemap data for views.

Namespace

Drupal\simple_sitemap_views

Code

public function getArgumentsFromIndexCount(?ConditionInterface $condition = NULL) : int {
  $query = $this->database
    ->select('simple_sitemap_views', 'ssv');
  if ($condition !== NULL) {
    $query
      ->condition($condition);
  }
  return $query
    ->countQuery()
    ->execute()
    ->fetchField();
}