function autoassignrole_page_delete_confirm in Auto Assign Role 7.2
Same name and namespace in other branches
- 7 autoassignrole.admin.inc \autoassignrole_page_delete_confirm()
Provides a FAPI form for deleting a pages.
Parameters
array $form: The form API form array.
array $form_state: The form API form state array.
stdClass|null: The existing page object or NULL for a new page.
string $mode: Mode: 'delete' or 'revert'.
Return value
array A form API renderable array.
1 string reference to 'autoassignrole_page_delete_confirm'
- autoassignrole_menu in ./
autoassignrole.module - Implements hook_menu().
File
- ./
autoassignrole.admin.inc, line 378 - Administrative functionality for auto assign role.
Code
function autoassignrole_page_delete_confirm($form, &$form_state, $page, $mode) {
$form['page'] = array(
'#type' => 'value',
'#value' => $page,
);
if ($mode == 'delete') {
$message = t('Are you sure you want to delete the page %name ?', array(
'%name' => $page->title,
));
$button = t('Delete');
}
else {
$message = t('Are you sure you want to revert the page %name ?', array(
'%name' => $page->title,
));
$button = t('Revert');
}
return confirm_form($form, $message, 'admin/config/people/autoassignrole/pages', t('This action cannot be undone.'), $button);
}