function _drush_make_generate_lines

8.0.x _drush_make_generate_lines($base, $values)
7.x _drush_make_generate_lines($base, $values)
master _drush_make_generate_lines($base, $values)

Utility function to generate the line or lines for a key/value pair in the make file.


$base: The base for the configuration lines. Values will be appended to it as [$key] = $value, or if value is an array itself it will expand into as many lines as required.

$values: May be a single value or an array.

Return value

An array of strings that represent lines for the make file.

2 calls to _drush_make_generate_lines()


commands/make/, line 266
Functions for the generate makefile command.


function _drush_make_generate_lines($base, $values) {
  $output = array();

  if (is_array($values)) {
    foreach ($values as $key => $value) {
      $newbase = $base . '[' . $key . ']';
      $output = array_merge($output, _drush_make_generate_lines($newbase, $value));
  else {
    $output[$base] = '"' . $values . '"';

  return $output;