function devel_drush_command in Devel 8.3
Same name and namespace in other branches
- 8 drush/devel.drush8.inc \devel_drush_command()
- 8.2 drush/devel.drush8.inc \devel_drush_command()
- 6 devel.drush.inc \devel_drush_command()
- 7 devel.drush.inc \devel_drush_command()
Implements hook_drush_command().
File
- drush/
devel.drush8.inc, line 16 - This file is only used by Drush8.
Code
function devel_drush_command() {
$items['devel-reinstall'] = [
'description' => dt('Uninstall, and Install a list of projects.'),
'drush dependencies' => [
'pm',
],
'arguments' => [
'projects' => dt('A space-separated list of project names.'),
],
'allow-additional-options' => [
'pm-uninstall',
'pm-enable',
],
'required-arguments' => 1,
'aliases' => [
'dre',
],
];
$items['fn-hook'] = [
'description' => 'List implementations of a given hook and explore the source of the selected one.',
'arguments' => [
'hook' => 'The name of the hook to explore (e.g. "menu" for hook_menu()).',
],
'examples' => [
'fn-hook cron' => 'List implementations of hook_cron().',
],
'allow-additional-options' => [
'fn-view',
],
'required-arguments' => 1,
'aliases' => [
'fnh',
'hook',
],
];
$items['fn-event'] = [
'description' => 'List implementations of a given event and explore source of specified one.',
'arguments' => [
'event' => 'The name of the event to explore. If omitted, a list of events is shown.',
],
'examples' => [
'fn-event' => 'Pick a Kernel event, then pick an implementation, and then view its source code.',
'fn-event kernel.terminate' => 'Pick a terminate subscribers and view its source code.',
],
'allow-additional-options' => [
'fn-view',
],
'aliases' => [
'fne',
'event',
],
];
$items['fn-view'] = [
'description' => 'Show the source of specified function or method.',
'arguments' => [
'function' => 'The name of the function or method to view.',
],
'options' => [
'pipe' => 'Output just the filename of the function or method',
'format' => 'Specify how the filename should be printed. Available placeholders are @startline, @endline and @file',
],
'examples' => [
'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' => [
'fnv',
],
'required-arguments' => 1,
];
$items['devel-token'] = [
'description' => dt('List available tokens'),
'aliases' => [
'token',
],
];
$items['devel-container-services'] = [
'description' => 'Get a list of available container services.',
'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
'core' => [
'8+',
],
'aliases' => [
'dcs',
],
'options' => [
'format' => 'Format to output. Allowed values are: json, export, html.',
],
'arguments' => [
'prefix' => 'A prefix to filter the service list by.',
],
'examples' => [
'drush container-services' => 'Gets a list of all available container services',
'drush container-services plugin.manager' => 'Get all services containing "plugin.manager"',
],
'outputformat' => [
'default' => 'list',
'pipe-format' => 'export',
],
];
$items['devel-generate-uuid'] = [
'description' => 'Generate a UUID.',
'core' => [
'8+',
],
'examples' => [
"drush devel-generate-uuid" => "Outputs a Universally Unique IDentifier.",
],
'aliases' => [
'uuid',
],
'outputformat' => [
'default' => 'string',
],
];
return $items;
}