5 * Contains {{ command_name }} drush command.
9 * Implements hook_drush_help().
11 function {{ command_file_prefix|h2u }}_drush_help($section) {
13 case 'drush:{{ command_name }}':
14 $help = dt('Help text here.');
20 * Implements hook_drush_command().
22 function {{ command_file_prefix|h2u }}_drush_command() {
24 $items['{{ command_name }}'] = [
25 'description' => '{{ description }}',
27 '{{ argument }}' => 'Argument description',
29 'required-arguments' => TRUE,
31 '{{ option }}' => 'Option description',
33 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
34 'aliases' => ['{{ alias }}'],
36 'drush {{ alias }} {{ argument }} --{{ option }}' => 'It does something with this argument',
44 * Callback function for {{ command_name }} command.
46 function drush_{{ command_callback_suffix|h2u }}($argument) {
48 $option = drush_get_option('{{ option }}', 'default');
49 drush_print(dt('Argument value is "@argument".', ['@argument' => $argument]));
50 drush_print(dt('Option value is "@option".', ['@option' => $option]));
52 drush_set_error(dt('Error text here.'));
53 drush_log(dt('Log text here'));