function make_apply_defaults

8.0.x make.utilities.inc make_apply_defaults(&$info)
6.x make.utilities.inc make_apply_defaults(&$info)
7.x make.utilities.inc make_apply_defaults(&$info)
5.x make.utilities.inc make_apply_defaults(&$info)
master make.utilities.inc make_apply_defaults(&$info)

Apply any defaults.

Parameters

array &$info: A parsed make array.

1 call to make_apply_defaults()
make_validate_info_file in commands/make/make.utilities.inc
Validate the make file.

File

commands/make/make.utilities.inc, line 509
General utility functions for Drush Make.

Code

function make_apply_defaults(&$info) {
  if (isset($info['defaults'])) {
    $defaults = $info['defaults'];
    unset($info['defaults']);

    foreach ($defaults as $type => $default_data) {
      if (isset($info[$type])) {
        foreach ($info[$type] as $project => $data) {
          $info[$type][$project] += $default_data;
        }
      }
      else {
        drush_log(dt("Unknown attribute '@type' in defaults array", array('@type' => $type)), 'warning');
      }
    }
  }
}