You are here

function xmlsitemap_sitemap_get_file in XML sitemap 8

Same name and namespace in other branches
  1. 6.2 xmlsitemap.module \xmlsitemap_sitemap_get_file()
  2. 7.2 xmlsitemap.module \xmlsitemap_sitemap_get_file()
  3. 2.x xmlsitemap.module \xmlsitemap_sitemap_get_file()

Return the expected file path for a specific sitemap chunk.

Parameters

Drupal\xmlsitemap\XmlSitemapInterface $sitemap: An XmlSitemapInterface sitemap object.

string $chunk: An optional specific chunk in the sitemap. Defaults to the index page.

Return value

string File path for a specific sitemap chunk.

Related topics

3 calls to xmlsitemap_sitemap_get_file()
XmlSitemapController::renderSitemapXml in src/Controller/XmlSitemapController.php
Provides the sitemap in XML format.
XmlSitemapGenerator::regenerateBatchGenerate in src/XmlSitemapGenerator.php
Batch callback; generate all pages of a sitemap.
XmlSitemapWriter::__construct in src/XmlSitemapWriter.php
Constructors and XmlSitemapWriter object.

File

./xmlsitemap.module, line 411
xmlsitemap XML sitemap

Code

function xmlsitemap_sitemap_get_file(XmlSitemapInterface $sitemap, $chunk = 'index') {
  return xmlsitemap_get_directory($sitemap) . "/{$chunk}.xml";
}