You are here

CronKeyChangeCommands.php in Cron key change 2.x

Same filename and directory in other branches
  1. 8 src/Commands/CronKeyChangeCommands.php

File

src/Commands/CronKeyChangeCommands.php
View 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

Namesort descending Description
CronKeyChangeCommands Drupal 9 commands.