function opigno_statistics_drush_command in Opigno statistics 3.x
Same name and namespace in other branches
- 8 opigno_statistics.drush.inc \opigno_statistics_drush_command()
Implements custom drush command.
File
- ./
opigno_statistics.drush.inc, line 13 - Opigno Statistics drush functions.
Code
function opigno_statistics_drush_command() {
$commands['statistics-update'] = [
'description' => 'Makes update of trainings statistics.',
'arguments' => [
'uid' => 'User entity ID.',
'gid' => 'Training group entity ID.',
],
'examples' => [
'drush statistics-update [uid] [gid]' => '',
'drush stup [uid] [gid]' => '',
'-' => '',
'Examples:' => '',
'--' => '',
'drush statistics-update 12 23' => '',
'drush stup 12 23' => 'Removes statistics records for user with id 12 and a training with id 23 and re-creates them.',
'---' => '',
'drush statistics-update' => '',
'drush stup' => 'Removes all the trainings statistics records and re-creates them.',
],
'callback' => 'opigno_statistics_update_command',
'aliases' => [
'stup',
],
];
return $commands;
}