function patterns_remove_pattern in Patterns 7
Same name and namespace in other branches
- 7.2 patterns.module \patterns_remove_pattern()
Form constructor for the Patterns removing form.
Creates a confirm_form to make sure the removing operation was intentional.
Parameters
mixed $pid The ID of the Pattern to enable.:
See also
patterns_remove_pattern_submit()
1 string reference to 'patterns_remove_pattern'
- patterns_menu in ./
patterns.module - Implements hook_menu().
File
- ./
patterns.module, line 634
Code
function patterns_remove_pattern($form, &$form_state, $pid = NULL) {
$pattern = patterns_utils_if_invalid_go_back($pid);
$form['pid'] = array(
'#type' => 'value',
'#value' => $pid,
);
$form['name'] = array(
'#type' => 'value',
'#value' => @$pattern->name,
);
$disclaimer = t('This operation cannot be undone. Are you sure?');
return confirm_form($form, t('Proceed with removing pattern %pattern?', array(
'%pattern' => $pattern->title,
)), 'admin/patterns', $disclaimer);
}