function patterns_remove_pattern_submit in Patterns 7
Same name and namespace in other branches
- 7.2 patterns.module \patterns_remove_pattern_submit()
Form submission handler for patterns_remove_pattern().
See also
File
- ./
patterns.module, line 658
Code
function patterns_remove_pattern_submit($form, &$form_state) {
$pid = $form_state['values']['pid'];
$name = $form_state['values']['name'];
$id = !empty($name) ? $name : $pid;
// Prints output
$result = patterns_io_remove_pattern($pid, TRUE);
$form_state['redirect'] = 'admin/patterns';
}