You are here

public static function MediaSitemapGenerator::generateSitemap in Media Sitemap 8

1 call to MediaSitemapGenerator::generateSitemap()
media_sitemap_cron in ./media_sitemap.module
Implements hook_cron().

File

src/MediaSitemapGenerator.php, line 57
Contains \Drupal\media_sitemap\MediaSitemapGenerator.

Class

MediaSitemapGenerator
Class MediaSitemapGenerator.

Namespace

Drupal\media_sitemap

Code

public static function generateSitemap() {
  $database = \Drupal::service('database');
  $configFactory = \Drupal::service('config.factory');
  $fileSystem = \Drupal::service('file_system');
  $messenger = \Drupal::service('messenger');
  $sitemapGenerator = new static($database, $configFactory, $fileSystem, $messenger);
  $sitemapGenerator
    ->process();
}