function annotationcommand_adapter_alter_option_description_format

master annotationcommand_adapter.inc annotationcommand_adapter_alter_option_description_format($option_help, $commandinfo, $default)

TODO: Document

File

includes/annotationcommand_adapter.inc, line 756
annotationcommand_adapter.inc

Code

function annotationcommand_adapter_alter_option_description_format($option_help, $commandinfo, $default) {
  $formatterManager = annotatedcomand_adapter_get_formatter();
  $return_type = $commandinfo->getReturnType();
  if (!empty($return_type)) {
    $available_formats = $formatterManager->validFormats($return_type);
    $option_help['description'] = dt('Select output format. Available: !formats.', array('!formats' => implode(', ', $available_formats)));
    if (!empty($default)) {
      $option_help['description'] .= dt(' Default is !default.', array('!default' => $default));
    }
  }
  return $option_help;
}