CronKeyChangeCommands.php in Cron key change 2.x
Same filename and directory in other branches
Namespace
Drupal\cronkeychange\CommandsFile
src/Commands/CronKeyChangeCommands.phpView source
<?php
namespace Drupal\cronkeychange\Commands;
use Drush\Commands\DrushCommands;
/**
* Drupal 9 commands.
*
* For commands that are parts of modules, Drush expects to find commandfiles
* in __MODULE__/src/Commands, and the namespace is Drupal/__MODULE__/Commands.
*
* In addition to a commandfile like this one, you need to
* add a drush.services.yml in root of your module like this module does.
*/
class CronKeyChangeCommands extends DrushCommands {
/**
* Generate new cron key.
*
* @command cronkeychange
*/
public function cronkeychange() {
cronkeychange_generate_submit();
$this
->output()
->writeln(dt('New cron key generated.'));
}
}
Classes
Name | Description |
---|---|
CronKeyChangeCommands | Drupal 9 commands. |