You are here

function devel_drush_command in Devel 6

Same name and namespace in other branches
  1. 8.3 drush/devel.drush8.inc \devel_drush_command()
  2. 8 drush/devel.drush8.inc \devel_drush_command()
  3. 8.2 drush/devel.drush8.inc \devel_drush_command()
  4. 7 devel.drush.inc \devel_drush_command()

Implements hook_drush_command().

File

./devel.drush.inc, line 11
Drush integration for the devel module.

Code

function devel_drush_command() {
  $items['devel-download'] = array(
    'description' => dt('Downloads the FirePHP library from http://firephp.org/.'),
    'arguments' => array(
      'path' => dt('Optional. A path to the download folder. If omitted Drush will use the default location (sites/all/libraries/firephp).'),
    ),
  );
  $items['devel-reinstall'] = array(
    'description' => dt('Disable, Uninstall, and Install a list of projects.'),
    'arguments' => array(
      'projects' => dt('A space-separated list of project names.'),
    ),
    'aliases' => array(
      'dre',
    ),
  );
  $items['fn-hook'] = array(
    'description' => 'List implementations of a given hook and explore the source of the selected one.',
    'arguments' => array(
      'hook' => 'The name of the hook to explore (e.g. "menu" for hook_menu()).',
    ),
    'examples' => array(
      'fn-hook cron' => 'List implementations of hook_cron().',
    ),
    'aliases' => array(
      'fnh',
      'hook',
    ),
  );
  $items['fn-view'] = array(
    'description' => 'Show the source of specified function or method.',
    'arguments' => array(
      'function' => 'The name of the function or method to view.',
    ),
    'options' => array(
      'pipe' => 'Output just the filename of the function',
      'format' => 'Specify how the filename should be printed. Available placeholders are !startline, !endline and !file',
    ),
    'examples' => array(
      'fn-view drupal_set_breadcrumb' => 'View the source code for function "drupal_set_breadcrumb"',
      'vi `drush --pipe fn-view user_access --format=\'+!startline !file\'`' => 'Edit the file that contains the function "user_access"',
      'fn-view NodeController::load' => 'View the source code for method load in the class NodeController',
    ),
    'aliases' => array(
      'fnv',
    ),
  );
  $items['devel-token'] = array(
    'description' => dt('List available tokens'),
    'aliases' => array(
      'token',
    ),
    'core' => array(
      7,
    ),
  );
  return $items;
}