You are here

function patterns_enable_pattern_submit in Patterns 6

Same name and namespace in other branches
  1. 5 patterns.module \patterns_enable_pattern_submit()
  2. 6.2 patterns.module \patterns_enable_pattern_submit()
  3. 7.2 patterns.module \patterns_enable_pattern_submit()
  4. 7 patterns.module \patterns_enable_pattern_submit()

File

./patterns.module, line 1322
Enables extremely simple adding/removing features to your site with minimal to no configuration

Code

function patterns_enable_pattern_submit($form, &$form_state) {
  $pid = $form_state['values']['pid'];
  patterns_load_components();
  $pattern = patterns_get_pattern($pid);
  patterns_execute_pattern($pattern, $form_state['values']);
  $form_state['redirect'] = 'admin/build/patterns';
}