2 namespace Drush\Commands\core;
4 use Drush\Commands\DrushCommands;
8 * Any commandfile may add topics.
9 * Set 'topic' => TRUE to indicate the command is a topic (REQUIRED)
10 * Begin the topic name with the name of the commandfile (just like
13 class DocsCommands extends DrushCommands
18 * @command docs:readme
19 * @aliases docs-readme
23 public function readme()
25 self::printFile(DRUSH_BASE_PATH. '/README.md');
29 * Drush's support for Git Bisect.
31 * @command docs:bisect
32 * @aliases docs-bisect
36 public function bisect()
38 self::printFile(DRUSH_BASE_PATH. '/examples/git-bisect.example.sh');
42 * Bashrc customization examples for Drush.
44 * @command docs:bashrc
45 * @aliases docs-bashrc
49 public function bashrc()
51 self::printFile(DRUSH_BASE_PATH. '/examples/example.bashrc');
55 * Configuration overview with examples from example.drush.yml.
57 * @command docs:configuration
58 * @aliases docs-configuration
62 public function config()
64 self::printFile(DRUSH_BASE_PATH. '/examples/example.drush.yml');
68 * Drupal config export instructions, including customizing config by environment.
70 * @command docs:config:exporting
71 * @aliases docs-config-exporting
75 public function configExport()
77 self::printFile(DRUSH_BASE_PATH. '/docs/config-exporting.md');
81 * Creating site aliases for running Drush on remote sites.
83 * @command docs:aliases
84 * @aliases docs-aliases
88 public function siteAliases()
90 self::printFile(DRUSH_BASE_PATH. '/examples/example.site.yml');
94 * Bootstrap explanation: how Drush starts up and prepares the Drupal environment.
96 * @command docs:bootstrap
97 * @aliases docs-bootstrap
101 public function bootstrap()
103 self::printFile(DRUSH_BASE_PATH. '/docs/bootstrap.md');
107 * Crontab instructions for running your Drupal cron tasks via `drush cron`.
114 public function cron()
116 self::printFile(DRUSH_BASE_PATH. '/docs/cron.md');
120 * Instructions on creating your own Drush commands.
122 * @command docs:commands
123 * @aliases docs-commands
127 public function commands()
129 self::printFile(DRUSH_BASE_PATH. '/docs/commands.md');
133 * Instructions on creating your own Drush Generators.
135 * @command docs:generators
136 * @aliases docs-generators
140 public function generators()
142 self::printFile(DRUSH_BASE_PATH. '/docs/generators.md');
146 * Example Drush command file.
148 * @command docs:examplecommand
149 * @aliases docs-examplecommand
153 public function exampleCommand()
155 self::printFile(DRUSH_BASE_PATH. '/examples/Commands/ArtCommands.php');
159 * Extend sql-sync to allow transfer of the sql dump file via http.
161 * @command docs:example-sync-via-http
162 * @aliases docs-example-sync-via-http
166 public function syncHttp()
168 self::printFile(DRUSH_BASE_PATH. '/examples/Commands/SyncViaHttpCommands.php');
172 * Example policy file.
174 * @command docs:policy
175 * @aliases docs-policy
179 public function policy()
181 self::printFile(DRUSH_BASE_PATH. '/examples/Commands/PolicyCommands.php');