function monolog_profile_delete_form in Monolog 7
Same name and namespace in other branches
- 6 monolog.admin.inc \monolog_profile_delete_form()
Deletes or reverts a profile configuration.
Parameters
stdClass $profile: The profile being deleted.
See also
monolog_profile_delete_form_submit()
1 string reference to 'monolog_profile_delete_form'
- monolog_menu in ./
monolog.module - Implements hook_menu().
File
- ./
monolog.admin.inc, line 482 - Administrative settings for the Monolog module.
Code
function monolog_profile_delete_form($form, &$form_state, $profile) {
$form['#monolog'] = array(
'profile' => $profile,
);
$revert = $profile->export_type & EXPORT_IN_CODE;
$args = array(
'%label' => $profile->options['label'],
);
if ($revert) {
$prompt = t('Are you sure you want to revert the %label profile?', $args);
}
else {
$prompt = t('Are you sure you want to remove the %label profile?', $args);
}
$cancel_path = 'admin/config/development/monolog/profile';
$warning = t('This action cannot be undone.');
$yes = $revert ? t('Revert') : t('Delete');
return confirm_form($form, $prompt, $cancel_path, $warning, $yes, t('Cancel'));
}