function om_tools_display_values_get in OM Tools 8.2
Same name and namespace in other branches
- 6.2 inc/om_tools.utils.inc \om_tools_display_values_get()
- 7.2 inc/om_tools.utils.inc \om_tools_display_values_get()
OM Tools variable parser
2 calls to om_tools_display_values_get()
- om_tools_admin_advanced in inc/
om_tools.admin.inc - Admin Form - Advanced Editing OM Tools API 2.0
- om_tools_admin_advanced_submit in inc/
om_tools.admin.inc - Admin Advanced Submit OM Tools API 2.0
File
- inc/
om_tools.utils.inc, line 119 - OM Tools Admin Utilities
Code
function om_tools_display_values_get(&$display_values, &$current_values, &$backup_values, $module = NULL) {
static $count = 0;
// for messages to occur only once even if this function called more than once
$display_values = '$' . $module . ' = array(' . "\n";
if (!empty($current_values)) {
$display_values .= om_tools_display_array_recursion($current_values);
}
elseif (empty($backup_values) && empty($current_values)) {
if ($count == 0) {
drupal_set_message(t('Your settings are empty, initialize your settings first'));
}
}
elseif (!empty($backup_values) && empty($current_values)) {
if ($count == 0) {
drupal_set_message(t('Your settings are empty, initialize your settings first or restore from backup'));
}
}
// var closing
$display_values .= ');';
$count++;
}