function environment_switch_confirm in Environment 7
Same name and namespace in other branches
- 6 environment.admin.inc \environment_switch_confirm()
Environment switch form callback.
Parameters
string $environment: The environment being switched to.
1 string reference to 'environment_switch_confirm'
- environment_menu in ./
environment.module - Implements hook_menu().
File
- ./
environment.admin.inc, line 94 - Settings for Environment module.
Code
function environment_switch_confirm(&$form_state, $environment) {
if (empty($environment)) {
drupal_set_message(t('Invalid environment "%environment". You cannot switch to an undefined environment.', array(
'%environment' => $environment,
)), 'warning');
drupal_goto('admin/settings/environment');
}
return confirm_form(array(
'environment' => array(
'#type' => 'hidden',
'#value' => $environment,
),
), t('Are you sure you want to switch the current environment?'), 'admin/settings/environment', t('This action switches the current environment to "%env". This kind of change is as risky as updating your site. This action cannot be undone.', array(
'%env' => $environment,
)), t('Switch environment'), t('Cancel'));
}