function drush_sitealias_resolve_sitelist

8.0.x sitealias.inc drush_sitealias_resolve_sitelist($alias_record)
6.x sitealias.inc drush_sitealias_resolve_sitelist($alias_record)
7.x sitealias.inc drush_sitealias_resolve_sitelist($alias_record)
3.x sitealias.inc drush_sitealias_resolve_sitelist($alias_record)
4.x sitealias.inc drush_sitealias_resolve_sitelist($alias_record)
5.x sitealias.inc drush_sitealias_resolve_sitelist($alias_record)
master sitealias.inc drush_sitealias_resolve_sitelist($alias_record)

Given an alias record that is a site list (contains a 'site-list' entry), resolve all of the members of the site list and return them is an array of alias records.

Parameters

$alias_record: The site list alias record array

Return value

An array of individual site alias records

3 calls to drush_sitealias_resolve_sitelist()
drush_core_execute in commands/core/core.drush.inc
Command callback. Execute specified shell code. Often used by shell aliases that start with !.
drush_sitealias_resolve_sitespecs in includes/sitealias.inc
Given an array of site specifications, resolve each one in turn and return an array of alias records. If you only want a single record, it is preferable to simply call drush_sitealias_get_record directly.
_drush_sitealias_initialize_alias_record in includes/sitealias.inc
Initialize an alias record; called as soon as the alias record is loaded from its alias file, before it is stored in the cache.

File

includes/sitealias.inc, line 1156
The site alias API.

Code

function drush_sitealias_resolve_sitelist($alias_record) {
  $result_list = array();
  if (isset($alias_record)) {
    if (array_key_exists('site-list', $alias_record)) {
      foreach ($alias_record['site-list'] as $sitespec) {
        $one_result = drush_sitealias_get_record($sitespec);
        $result_list = array_merge($result_list, drush_sitealias_resolve_sitelist($one_result));
      }
    }
    elseif (array_key_exists('#name', $alias_record)) {
      $result_list[$alias_record['#name']] = $alias_record;
    }
  }

  return $result_list;
}