function docs_drush_command

8.0.x docs.drush.inc docs_drush_command()
6.x docs.drush.inc docs_drush_command()
7.x docs.drush.inc docs_drush_command()
4.x docs.drush.inc docs_drush_command()
5.x docs.drush.inc docs_drush_command()
master docs.drush.inc docs_drush_command()

Implementation of hook_drush_command().

Return value

An associative array describing your command(s).

File

commands/core/docs.drush.inc, line 26
Documentation commands providing various topics.

Code

function docs_drush_command() {
  $docs_dir = drush_get_context('DOC_PREFIX', DRUSH_BASE_PATH);

  //
  // Topic commands.
  // Any commandfile may add topics.
  // Set 'topic' => TRUE to indicate the command is a topic (REQUIRED)
  // Begin the topic name with the name of the commandfile (just like
  // any other command).
  //
  $items['docs-readme'] = array(
    'description' => 'README.txt',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/README.txt'),
  );
  $items['docs-configuration'] = array(
    'description' => 'Drush configuration overview with examples',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/examples/example.drushrc.php'),
  );
  $items['docs-aliases'] = array(
    'description' => 'Site aliases overview with examples',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/examples/example.aliases.drushrc.php'),
  );
  $items['docs-ini-files'] = array(
    'description' => 'Configuring php.ini or drush.ini for use with drush.',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/examples/example.drush.ini'),
  );
  $items['docs-bastion'] = array(
    'description' => 'How to use a bastion server to remotely operate on Drupal sites behind a firewall.',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/docs/bastion.html'),
  );
  $items['docs-bootstrap'] = array(
    'description' => 'Information about the drush bootstrap process.',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/docs/bootstrap.html'),
  );
  $items['docs-scripts'] = array(
    'description' => 'Overview on how to write drush shell scripts.',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/docs/shellscripts.html'),
  );
  $items['docs-commands'] = array(
    'description' => 'Overview on how to write drush commands.',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/docs/commands.html'),
  );
  $items['docs-errorcodes'] = array(
    'description' => 'Summary of drush error codes.',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
  );
  $items['docs-api'] = array(
    'description' => 'Drush API',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/docs/drush.api.php'),
  );
  $items['docs-context'] = array(
    'description' => 'Drush contexts',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/docs/context.html'),
  );
  $items['docs-examplescript'] = array(
    'description' => 'Example drush script',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/examples/helloworld.script'),
  );
  $items['docs-examplecommand'] = array(
    'description' => 'Example drush command file.',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/examples/sandwich.drush.inc'),
  );
  $items['docs-policy'] = array(
    'description' => 'Example policy file.',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/examples/policy.drush.inc'),
  );
  $items['docs-upgrading'] = array(
    'description' => 'Upgrading Drupal using the drush site-upgrade command.',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array($docs_dir . '/docs/upgrade.html'),
  );
  return $items;
}