function drush_get_option_list

8.0.x context.inc drush_get_option_list($option, $default = array(), $context = NULL)
6.x context.inc drush_get_option_list($option, $default = array(), $context = NULL)
7.x context.inc drush_get_option_list($option, $default = array(), $context = NULL)
4.x context.inc drush_get_option_list($option, $default = array(), $context = NULL)
5.x context.inc drush_get_option_list($option, $default = array(), $context = NULL)
master context.inc drush_get_option_list($option, $default = array(), $context = NULL)

Get the value for an option and return it as a list. If the option in question is passed on the command line, its value should be a comma-separated list (e.g. --flag=1,2,3). If the option was set in a drushrc.php file, then its value may be either a comma-separated list or an array of values (e.g. $option['flag'] = array('1', '2', '3')).

Parameters

option: The name of the option to get

default: Optional. The value to return if the option has not been set

context: Optional. The context to check for the option. If this is set, only this context will be searched.

9 calls to drush_get_option_list()
drush_core_requirements in commands/core/core.drush.inc
Command callback. Provides information from the 'Status Reports' admin page.
drush_core_runserver in commands/runserver/runserver.drush.inc
Callback for runserver command.
drush_make in commands/make/make.drush.inc
Drush callback; make based on the makefile.
drush_pm_updatecode in commands/pm/updatecode.pm.inc
Command callback. Displays update status info and allows to update installed projects. Pass specific projects as arguments, otherwise we update all that have candidate releases.
drush_sync_enable_post_sql_sync in examples/sync_enable.drush.inc
Implement hook post sql sync.

... See full list

File

includes/context.inc, line 443
The Drush context API implementation.

Code

function drush_get_option_list($option, $default = array(), $context = NULL) {
  $result = drush_get_option($option, $default, $context);

  if (!is_array($result)) {
    $result = explode(',', $result);
  }

  return $result;
}