Commit 2a7447c9 authored by gbyte.co's avatar gbyte.co

Issue #2692275 by podarok: Ability to alter sitemap links before saving

parent d284ea04
......@@ -107,13 +107,16 @@ class SitemapGenerator {
}
/**
* Wrapper method which takes links along with their options and then
* generates and saves the sitemap.
* Wrapper method which takes links along with their options, lets other
* modules alter the links and then generates and saves the sitemap.
*
* @param array $links
* All links with their multilingual versions and settings.
*/
public static function generateSitemap($links) {
// Invoke alter hook.
\Drupal::moduleHandler()->alter('simple_sitemap_links', $links);
$values = array(
'id' => db_query('SELECT MAX(id) FROM {simple_sitemap}')->fetchField() + 1,
'sitemap_string' => self::generateSitemapChunk($links),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment