2 namespace Drush\Commands;
5 * Common options providers. Use them by adding an annotation to your method.
7 use Symfony\Component\Console\Input\InputOption;
12 const REQ=InputOption::VALUE_REQUIRED;
15 * @hook option @optionset_proc_build
16 * @option ssh-options A string of extra options that will be passed to the ssh command (e.g. "-p 100")
17 * @option tty Create a tty (e.g. to run an interactive program).
19 public function optionsetProcBuild($options = ['ssh-options' => self::REQ, 'tty' => false])
24 * @hook option @optionset_get_editor
25 * @option editor A string of bash which launches user's preferred text editor. Defaults to ${VISUAL-${EDITOR-vi}}.
26 * @option bg Run editor in the background. Does not work with editors such as `vi` that run in the terminal.
28 public function optionsetGetEditor($options = ['editor' => '', 'bg' => false])
33 * @hook option @optionset_ssh
34 * @option ssh-options A string appended to ssh command during rsync, sql-sync, etc.
36 public function optionsetSsh($options = ['ssh-options' => self::REQ])
41 * @hook option @optionset_sql
42 * @option database The DB connection key if using multiple connections in settings.php.
43 * @option db-url A Drupal 6 style database URL.
44 * @option target The name of a target within the specified database connection. Defaults to default
46 public function optionsetSql($options = ['database' => 'default', 'target' => 'default', 'db-url' => self::REQ])
51 * @hook option @optionset_table_selection
52 * @option skip-tables-key A key in the $skip_tables array. @see example.drush.yml
53 * @option structure-tables-key A key in the $structure_tables array. @see example.drush.yml
54 * @option tables-key A key in the $tables array.
55 * @option skip-tables-list A comma-separated list of tables to exclude completely.
56 * @option structure-tables-list A comma-separated list of tables to include for structure, but not data.
57 * @option tables-list A comma-separated list of tables to transfer.
59 public function optionsetTableSelection($options = [
60 'skip-tables-key' => self::REQ,
61 'structure-tables-key' => self::REQ,
62 'tables-key' => self::REQ,
63 'skip-tables-list' => self::REQ,
64 'structure-tables-list' => self::REQ,
65 'tables-list' => self::REQ])