You are here

function patterns_remove_pattern_submit in Patterns 7.2

Same name and namespace in other branches
  1. 7 patterns.module \patterns_remove_pattern_submit()

Form submission handler for patterns_remove_pattern().

See also

patterns_remove_pattern()

File

./patterns.module, line 600

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';
}