You are here

function node_export_drush_help in Node export 8

Same name and namespace in other branches
  1. 6.3 node_export.drush.inc \node_export_drush_help()
  2. 6.2 node_export.drush.inc \node_export_drush_help()
  3. 7.3 node_export.drush.inc \node_export_drush_help()

Implements hook_drush_help().

This function is called whenever a drush user calls 'drush help <name-of-your-command>'.

File

./node_export.drush.inc, line 58
Drush integration for Node Export module.

Code

function node_export_drush_help($section) {

  // This is to prevent duplication of information from hook_drush_command().
  $commands = node_export_drush_command();
  foreach ($commands as $command => $command_info) {
    if ($section == 'drush:' . $command) {
      $out = $command_info['description'];
      if (isset($command_info['node_export alias for'])) {
        $output .= "\nThis command is an alias for ";
        $output .= $command_info['node_export alias for'] . ".";
      }
      $out .= "\n\nArguments:";
      if (isset($command_info['arguments'])) {
        foreach ($command_info['arguments'] as $k => $v) {
          $out .= "\n  " . $k . " : " . $v;
        }
      }
      $out .= "\n\nExamples:";
      if (isset($command_info['examples'])) {
        foreach ($command_info['examples'] as $k => $v) {
          $out .= "\n" . $k . "          " . $v;
        }
      }
      return dt($out);
    }
  }
}