function sandwich_drush_help

8.0.x sandwich.drush.inc sandwich_drush_help($section)
6.x sandwich.drush.inc sandwich_drush_help($section)
7.x sandwich.drush.inc sandwich_drush_help($section)
3.x sandwich.drush.inc sandwich_drush_help($section)
4.x sandwich.drush.inc sandwich_drush_help($section)
5.x sandwich.drush.inc sandwich_drush_help($section)
master sandwich.drush.inc sandwich_drush_help($section)

Implements hook_drush_help().

This function is called whenever a drush user calls 'drush help <name-of-your-command>'. This hook is optional. If a command does not implement this hook, the command's description is used instead.

This hook is also used to look up help metadata, such as help category title and summary. See the comments below for a description.

File

examples/sandwich.drush.inc, line 140
Example drush command.

Code

function sandwich_drush_help($section) {
  switch ($section) {
    case 'drush:make-me-a-sandwich':
      return dt("This command will make you a delicious sandwich, just how you like it.");

      // The 'title' meta item is used to name a group of
      // commands in `drush help`.  If a title is not defined,
      // the default is "All commands in ___", with the
      // specific name of the commandfile (e.g. sandwich).
      // Command files with less than four commands will
      // be placed in the "Other commands" section, _unless_
      // they define a title.  It is therefore preferable
      // to not define a title unless the file defines a lot
      // of commands.
    case 'meta:sandwich:title':
      return dt("Sandwich commands");

      // The 'summary' meta item is displayed in `drush help --filter`,
      // and is used to give a general idea what the commands in this
      // command file do, and what they have in common.
    case 'meta:sandwich:summary':
      return dt("Automates your sandwich-making business workflows.");
  }
}