You are here

protected function Simplesitemap::getSitemapIndex in Simple XML sitemap 8.2

Generates and returns the sitemap index as string.

@todo Need to make sure response is cached.

Parameters

array $chunk_info: Array containing chunk creation timestamps keyed by chunk ID.

Return value

string The sitemap index.

1 call to Simplesitemap::getSitemapIndex()
Simplesitemap::getSitemap in src/Simplesitemap.php
Returns the whole sitemap, a requested sitemap chunk, or the sitemap index file.

File

src/Simplesitemap.php, line 282

Class

Simplesitemap
Class Simplesitemap @package Drupal\simple_sitemap

Namespace

Drupal\simple_sitemap

Code

protected function getSitemapIndex($chunk_info) {
  return $this->sitemapGenerator
    ->setSettings([
    'base_url' => $this
      ->getSetting('base_url', ''),
  ])
    ->generateSitemapIndex($chunk_info);
}