Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
55
vendor/chi-teck/drupal-code-generator/templates/other/drush-command.twig
vendored
Normal file
55
vendor/chi-teck/drupal-code-generator/templates/other/drush-command.twig
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains {{ command_name }} drush command.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_drush_help().
|
||||
*/
|
||||
function {{ command_file_prefix|h2u }}_drush_help($section) {
|
||||
switch ($section) {
|
||||
case 'drush:{{ command_name }}':
|
||||
$help = dt('Help text here.');
|
||||
return $help;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_drush_command().
|
||||
*/
|
||||
function {{ command_file_prefix|h2u }}_drush_command() {
|
||||
|
||||
$items['{{ command_name }}'] = [
|
||||
'description' => '{{ description }}',
|
||||
'arguments' => [
|
||||
'{{ argument }}' => 'Argument description',
|
||||
],
|
||||
'required-arguments' => TRUE,
|
||||
'options' => [
|
||||
'{{ option }}' => 'Option description',
|
||||
],
|
||||
'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
|
||||
'aliases' => ['{{ alias }}'],
|
||||
'examples' => [
|
||||
'drush {{ alias }} {{ argument }} --{{ option }}' => 'It does something with this argument',
|
||||
],
|
||||
];
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function for {{ command_name }} command.
|
||||
*/
|
||||
function drush_{{ command_callback_suffix|h2u }}($argument) {
|
||||
|
||||
$option = drush_get_option('{{ option }}', 'default');
|
||||
drush_print(dt('Argument value is "@argument".', ['@argument' => $argument]));
|
||||
drush_print(dt('Option value is "@option".', ['@option' => $option]));
|
||||
|
||||
drush_set_error(dt('Error text here.'));
|
||||
drush_log(dt('Log text here'));
|
||||
|
||||
}
|
Reference in a new issue