You are here

function ultimate_cron_blank_values in Ultimate Cron 7.2

Same name and namespace in other branches
  1. 8.2 ultimate_cron.module \ultimate_cron_blank_values()

Return blank values for all keys in an array.

Parameters

array $array: Array to generate blank values from.

Return value

array Array with same keys as input, but with blank values (empty string).

2 calls to ultimate_cron_blank_values()
UltimateCronPlugin::jobSettingsForm in ./ultimate_cron.plugin.inc
Job settings form.
UltimateCronPluginMultiple::jobSettingsForm in ./ultimate_cron.plugin.inc
Job settings form.

File

./ultimate_cron.module, line 1583

Code

function ultimate_cron_blank_values($array) {
  $result = array();
  foreach ($array as $key => $value) {
    switch (gettype($value)) {
      case 'array':
        $result[$key] = array();
        break;
      default:
        $result[$key] = '';
    }
  }
  return $result;
}