You are here

function drush_simple_sitemap_generate in Simple XML sitemap 4.x

Same name and namespace in other branches
  1. 8.3 simple_sitemap.drush.inc \drush_simple_sitemap_generate()
  2. 8.2 simple_sitemap.drush.inc \drush_simple_sitemap_generate()

Callback function for hook_drush_command().

Regenerate the XML sitemaps according to the module settings.

1 string reference to 'drush_simple_sitemap_generate'
simple_sitemap_drush_command in ./simple_sitemap.drush.inc
Implements hook_drush_command().

File

./simple_sitemap.drush.inc, line 36
Drush (< 9) integration.

Code

function drush_simple_sitemap_generate() {
  \Drupal::service('simple_sitemap.generator')
    ->generateSitemap(QueueWorker::GENERATE_TYPE_DRUSH);
}