class SimplesitemapCommands in Simple XML sitemap 8.2
Same name and namespace in other branches
- 8.3 src/Commands/SimplesitemapCommands.php \Drupal\simple_sitemap\Commands\SimplesitemapCommands
- 4.x src/Commands/SimpleSitemapCommands.php \Drupal\simple_sitemap\Commands\SimpleSitemapCommands
Class SimplesitemapCommands @package Drupal\simple_sitemap\Commands
Hierarchy
- class \Drupal\simple_sitemap\Commands\SimplesitemapCommands extends \Drush\Commands\DrushCommands
Expanded class hierarchy of SimplesitemapCommands
1 string reference to 'SimplesitemapCommands'
1 service uses SimplesitemapCommands
File
- src/
Commands/ SimplesitemapCommands.php, line 12
Namespace
Drupal\simple_sitemap\CommandsView source
class SimplesitemapCommands extends DrushCommands {
/**
* @var \Drupal\simple_sitemap\Simplesitemap
*/
protected $generator;
/**
* SimplesitemapCommands constructor.
* @param \Drupal\simple_sitemap\Simplesitemap $generator
*/
public function __construct(Simplesitemap $generator) {
$this->generator = $generator;
}
/**
* Regenerate the XML sitemap according to the module settings.
*
* @command simple-sitemap:generate
* @validate-module-enabled simple_sitemap
* @aliases ss:generate, ssg, simple_sitemap:generate, simple_sitemap-generate
*/
public function generate() {
$this->generator
->generateSitemap('drush');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SimplesitemapCommands:: |
protected | property | ||
SimplesitemapCommands:: |
public | function | Regenerate the XML sitemap according to the module settings. | |
SimplesitemapCommands:: |
public | function | SimplesitemapCommands constructor. |