function drush_config_list

8.0.x config.drush.inc drush_config_list($prefix = '')
7.x config.drush.inc drush_config_list($prefix = '')
master config.drush.inc drush_config_list($prefix = '')

Config list command callback

Parameters

string $prefix: The config prefix to retrieve, or empty to return all.

File

commands/core/config.drush.inc, line 211
Provides Configuration Management commands.

Code

function drush_config_list($prefix = '') {
  $names = \Drupal::configFactory()->listAll($prefix);

  if (empty($names)) {
    // Just in case there is no config.
    if (!$prefix) {
      return drush_set_error(dt('No config storage names found.'));
    }
    else {
      return drush_set_error(dt('No config storage names found matching @prefix', array('@prefix' => $prefix)));
    }
  }

  return $names;
}