function node_accessibility_drush_help in Node Accessibility 7
Implements hook_drush_help().
This function is called whenever a drush user calls 'drush help <name-of-your-command>'
Parameters
A string with the help section (prepend with 'drush:'):
Return value
A string with the help text for your command.
File
- ./
node_accessibility.drush.inc, line 70 - Defines the accessibilty page drush functions.
Code
function node_accessibility_drush_help($section) {
// This is to prevent duplication of information from hook_drush_command().
$commands = node_accessibility_drush_command();
foreach ($commands as $command => $command_info) {
if ($section == 'drush:' . $command) {
$out = $command_info['description'];
if (isset($command_info['node_accessibility alias for'])) {
$output .= "\nThis command is an alias for ";
$output .= $command_info['node_accessibility alias for'] . ".";
}
if (isset($command_info['node_accessibility command aliases'])) {
if (count($command_info['node_accessibility command aliases']) == 1) {
$output .= "\nThis command can be called by it's alias; ";
$output .= $command_info['node_accessibility command aliases'] . ".";
}
else {
$last_alias = array_pop($command_info['node_accessibility command aliases']);
$output .= "\nThis command can be called by it's aliases; ";
$output .= implode(", ", $command_info['node_accessibility command aliases']);
$output .= ", or " . $last_alias . ".";
}
}
$info = array();
$info['arguments'] = "Arguments";
$info['options'] = "Options";
$info['examples'] = "Examples";
foreach ($info as $key => $value) {
$out .= "\n\n{$value}:";
if (isset($command_info[$key])) {
foreach ($command_info[$key] as $k => $v) {
$out .= "\n " . $k . " : " . $v;
}
}
}
return dt($out);
}
}
}