function devel_drush_command

Same name in other branches
  1. 6.x-1.x devel.drush.inc \devel_drush_command()
  2. 7.x-1.x devel.drush.inc \devel_drush_command()

Implements hook_drush_command().

File

drush/devel.drush8.inc, line 14

Code

function devel_drush_command() {
    $items['devel-reinstall'] = array(
        'description' => dt('Uninstall, and Install a list of projects.'),
        'drush dependencies' => array(
            'pm',
        ),
        'arguments' => array(
            'projects' => dt('A space-separated list of project names.'),
        ),
        'allow-additional-options' => array(
            'pm-uninstall',
            'pm-enable',
        ),
        'required-arguments' => 1,
        '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().',
        ),
        'allow-additional-options' => array(
            'fn-view',
        ),
        'required-arguments' => 1,
        'aliases' => array(
            'fnh',
            'hook',
        ),
    );
    $items['fn-event'] = array(
        'description' => 'List implementations of a given event and explore source of specified one.',
        'arguments' => array(
            'event' => 'The name of the event to explore. If omitted, a list of events is shown.',
        ),
        'examples' => array(
            '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' => array(
            'fn-view',
        ),
        'aliases' => array(
            'fne',
            'event',
        ),
    );
    $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 or method',
            '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',
        ),
        'required-arguments' => 1,
    );
    $items['devel-token'] = array(
        'description' => dt('List available tokens'),
        'aliases' => array(
            'token',
        ),
    );
    $items['devel-container-services'] = array(
        'description' => 'Get a list of available container services.',
        'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
        'core' => array(
            '8+',
        ),
        'aliases' => array(
            'dcs',
        ),
        'options' => array(
            'format' => 'Format to output. Allowed values are: json, export, html.',
        ),
        'arguments' => array(
            'prefix' => 'A prefix to filter the service list by.',
        ),
        'examples' => array(
            'drush container-services' => 'Gets a list of all available container services',
            'drush container-services plugin.manager' => 'Get all services containing "plugin.manager"',
        ),
        'outputformat' => array(
            'default' => 'list',
            'pipe-format' => 'export',
        ),
    );
    $items['devel-generate-uuid'] = array(
        'description' => 'Generate a UUID.',
        'core' => array(
            '8+',
        ),
        'examples' => array(
            "drush devel-generate-uuid" => "Outputs a Universally Unique IDentifier.",
        ),
        'aliases' => array(
            'uuid',
        ),
        'outputformat' => array(
            'default' => 'string',
        ),
    );
    return $items;
}