You are here

function user_import_drush_command in User Import 7.2

Same name and namespace in other branches
  1. 8 user_import.drush.inc \user_import_drush_command()
  2. 6.4 user_import.drush.inc \user_import_drush_command()
  3. 6.2 user_import.drush.inc \user_import_drush_command()
  4. 7.3 user_import.drush.inc \user_import_drush_command()
  5. 7 user_import.drush.inc \user_import_drush_command()

Implementation of hook_drush_command().

In this hook, you specify which commands your drush module makes available, what it does and description.

Notice how this structure closely resembles how you define menu hooks.

See `drush topic docs-commands` for a list of recognized keys.

Return value

An associative array describing your command(s).

File

./user_import.drush.inc, line 36
Drush integration for the User Import module.

Code

function user_import_drush_command() {
  $commands = array();
  $commands['user-import'] = array(
    'description' => dt('Queue an import of users'),
    'arguments' => array(
      'file' => dt('The CSV file with user data'),
      'template' => dt('Name of the template to use (optional, if not provided the default template is used)'),
    ),
    'examples' => array(
      dt('standard example') => 'drush user-import users.csv',
    ),
  );
  return $commands;
}